Script to enable remote login

In my job I am constantly required to SSH into other computers to fix problems via terminal. Is there any known script that I can use to enable remote login on my computer quickly rather than having to go to system preferences every time?
Thanks for your help!

I'm not sure I understand this request.
In my job I am constantly required to SSH into other computers to fix problems via terminal.
OK, fair enough...
Is there any known script that I can use to enable remote login on my computer
Enabling SSH/remote login on your computer isn't going to help at all. You need to enable remote login on the remote computer.
It may be possible to have an AppleScript execute commands on a remote machine, if that's what you mean, but in order for this to happen the remote machine has to have Remote Apple Events enabled. In my experience, there are even fewer machines with Remote Apple Events enabled than there are with Remote Login - it's disabled by default and is unlikely to be enabled by most users.
So if Remote Login isn't enabled, your only solution is Remote Apple Events, but if that's off you're pretty much out of luck (unless you have some kind of screen sharing setup running).

Similar Messages

  • Remotely enable "Remote Login"

    I need to enable "Remote Login" on several hundred macs. I am wondering if this can be done in bulk via ARD or by pushing out a script?
    The computers are currently not bound to Open Dir - that server failed and will be replaced in the near future
    Thanks for any info!
    Dennis

    This is done using several specific arguments for the serveradmin command. ...... you can use this feature to push them out to multiple workstations at a single time.

  • Script to open Remote Login in "sharing" not working after move to 10.5

    Under 10.4 I sued the following script to open Remote Login (tick the box). Under 10.5.6 it does not work.
    do shell script "/usr/bin/open /System/Library/PreferencePanes/SharingPref.prefPane"
    activate application "System Preferences"
    tell application "System Events"
    tell process "System Preferences"
    click checkbox 1 of row 6 of table 1 of scroll area 1 of tab group 1 of window "Sharing"
    delay 3
    tell application "System Events"
    quit application "System Preferences"
    end tell
    end tell
    end tell
    I get the following error:
    System Events got an error: Can’t get tab group 1 of window "Sharing" of process "System Preferences". Invalid index.
    Anybody know why?

    give this a spin
    activate application "System Preferences"
    tell application "System Events"
    tell process "System Preferences"
    click button "Sharing" of scroll area 1 of window "System Preferences"
    select scroll area 1 of group 1 of window "Sharing"
    select static text "File Sharing" of row 3 of table 1 of scroll area 1 of group 1 of window "Sharing"
    select checkbox 1 of row 3 of table 1 of scroll area 1 of group 1 of window "Sharing"
    click button "Options…" of splitter group 1 of group 1 of window "Sharing"
    click checkbox "Share files and folders using FTP" of sheet 1 of window "Sharing"
    delay 0.5
    select button 2 of sheet 1 of window "Sharing"
    keystroke return
    delay 0.5
    tell application "System Events"
    quit application "System Preferences"
    end tell
    end tell
    end tell
    -----------------

  • Enable Remote Login remotely

    Hello,
    I have 200 Macintosh computers running Tiger and I need to enable Remote Login on all of them. Anyone know how I can this remotely? I do have Apple Remote Desktop as well.
    Thanks

    While I have never tried this myself, you should be able to do it with by sending the following Unix command as root to the machines:
    systemsetup -setremotelogin on
    You can then check to make sure it worked by sending this unix command as root to the same machines:
    systemsetup -getremotelogin
    Robert

  • Getting ssh_exchane_identity error when trying to login from my machine or a remote one. Already enabled remote login

    I updated my system from Snow Leopard to Lion 7.3.1
    Wanted to login from remote computer and then enabled the remote login in Preferences/Sharing, but when trying to login I get the error ssh_exchange_identification also if I try to login from my machine with ssh username@localhost.
    I tried all what I could find on internet forums, but nothing changed.
    Please help!!
    Daniela

    Hi Linc
    here is the output of ssh -vvv localhost
    OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
    debug1: Reading configuration data /etc/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to localhost [::1] port 22.
    debug1: Connection established.
    debug3: Not a RSA1 key file /Users/danielamaurizio/.ssh/id_rsa.
    debug2: key_type_from_name: unknown key type '-----BEGIN'
    debug3: key_read: missing keytype
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug2: key_type_from_name: unknown key type '-----END'
    debug3: key_read: missing keytype
    debug1: identity file /Users/danielamaurizio/.ssh/id_rsa type 1
    debug1: identity file /Users/danielamaurizio/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/danielamaurizio/.ssh/id_dsa type -1
    debug1: identity file /Users/danielamaurizio/.ssh/id_dsa-cert type -1
    ssh_exchange_identification: Connection closed by remote host
    [1]+  Done                    edit sshd_config
    The following line comes from /var/log/secure.log
    May 23 04:59:46 <danielamaurizio> sshd[2267]: fatal: /var/empty must be owned by root and not group or world-writable.
    but I'm not sure if it's want you asked me; the owner of /var/empty is root of group sys.
    By the way I had a problem that Lion cancelled the owner root and I had to use System Preferences User and groups to add root again, with the result that now I can use only the comman "su root" and not "sudo anycommand"  anymore.
    Thanks for halp and cheers
    daniela

  • Script that enables Remote Management and adds user

    I need to make a script that can enable Remote Management and add a user to control it.
    I have tried to watch which plist files it uses so I could edit those.
    It writes some text in com.apple.RemoteManagement.plist and com.apple.ARDAgent.plist bit I can't find where the user is added.
    Any ideas guys
    Thanks

    No need to mess around with .plists. ARD has a command-line admin tool. The syntax is a little funky, but this should give you an idea:
    $ sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -activate -configure -access -on -users john -restart -agent -privs -all
    This is all covered in more detail in Apple's technote.

  • Execute .sql scripts from a remote login

    Hello,
    1) How do I execute a remote sql script from sqlplus?
    SQL>@remote_server:$HOME/test_sql.sql ...this did not work, which would work?
    2) Another question, in sqlplus I can do...! echo testing123>$HOME/test123.txt.
    How do I do this within a store procedure?
    This does not work, which would work?
    declare
    v_test varchar2(300) := '! echo testing123>$HOME/test123.txt';
    begin
    execute immediate v_test;
    end;
    /

    Re Q2.
    I take it that's an sqlplus feature on unix as it doesn't work on windows:
    SQL> ! echo testing123>$HOME/test123.txt
    SP2-0734: unknown command beginning "! echo tes..." - rest of line ignored.
    SQL>Also the reason this isn't working from within PL/SQL is that the execute immediate statement is used to send SQL statements to the SQL engine. What you are attempting to do is to send sqlplus commands to the SQL engine which obviously knows nothing about sqlplus commands. Those commands are very specific to the sqlplus executable and will only work in that environment.
    ;)

  • System preferences remote login address naming HELP PLEASE

    Hello,
    This problem is driving me crazy... Enabling Remote Login (under Sharing Preferences) gives me a note that "To log in to this computer remotely, type ssh [email protected]". The problem is the part of the address named "wrongname".  I have no idea where it is picking this up. I've gone back under the networking preferences and confirmed it's not coming from there. The netbios name by the way is "CARLS-MACBKPRO1". Enabling file sharing gives me the same "wrongname". Any idea where this is coming from and how do I fix it?
    Running 10.7.3 on a Macbook Pro.
    Thanks in advance.
    Carl

    The question is how are you trying to connect to the server? and where are you testing from?
    You say you can 'log-in to the Mac-Mini from the internal network', but what protocol are you using?
    The ports you've opened are for web (80), FTP (21) and SSH (22), so if you're using any other protocol (e.g. AFP for file sharing), it won't work.
    So, you need to decide what protocol you want to use and forward the appropriate ports. For example, if you do want to use AFP to transfer files, you'll need to open port 548.
    An alternative is to just use port 22 and use SSH tunneling to tunnel other protocols over a secure connection (normal AFP, web, etc. traffic is not secure and tunneling these protocols over an SSH connection provides an enhanced level of security.

  • New screen for remote login

    I have a Mac Mini running MediaCentral or FrontRow in fullscreen. From time to time I would like to login remotely from a Macbook to perform some tasks etc.
    Until now I use ScreenSharing or RemoteDesktop. My problem: Bot solutions share the systems live screen, so I have exit MediaCentral or FrontRow to use the system.
    I would like to login remotely and get a new screen, if possible.

    If you are comfortable enough with the Terminal, enable 'Remote Login' on the Mac Mini and login in to it with the Terminal app via SSH.

  • Script to turn on remote login in preferences

    I like to make a script that would open port 22 (remote login) in the sharing pane.
    I have
    do shell script "/usr/bin/open /System/Library/PreferencePanes/SharingPref.prefPane"
    this brings up the correct window. But now I am stuck, how do I get the remote login to ‘switch’ on?
    Thanking you for suggestions and help.

    Solved it.
    script is:
    do shell script "/usr/bin/open /System/Library/PreferencePanes/SharingPref.prefPane"
    activate application "System Preferences"
    tell application "System Events"
    tell process "System Preferences"
    click checkbox 1 of row 4 of table 1 of scroll area 1 of tab group 1 of window "Sharing"
    end tell
    end tell
    But in order for it to work yo need to turn on "ENABLE ASSISTIVE DEVICES" in the "UNIVERSAL ACCESS" preferences pane.
    so simple...

  • Enable X remote login?

    Hi, I have one machine(Solaris 8 ) can login CDE locally.
    But I can not login remotely by using exceed, x-win32 . The dtlogin is running.
    Does anybody know how to enalbe the remote login?
    [email protected]

    If dtlogin is working the problem might be in exceed config .
    Use xdmp broadcast method for connecting to your server . If your host is not showing up in the hosts window go to exceed config program and add host name/s you want to access using exceed.
    Hemant
    http://www.adminschoice.com

  • How to enable Remote Management on multiple Macs using Workgroup Manager?

    Hi
    I want to use workgroup manager to enable remote management on multiple macs I manage.
    How can I do that?
    Regards,
    Omer Barel

    The only way I know to enable remote managment remotely is by running kickstart.
    http://support.apple.com/kb/HT2370
    If you are already using a login script you could run kickstart from there.
    We clone our Macs with remote management turned on.
    Otherwise, lace up your sneakers.   

  • Solaris 9 remote login (ssh) drops connection

    Hello All,
    I wonder if you can help me...
    Let me give you some set-up details before I ask you the question.
    I have Ultra-60 at home with Solaris 9 and recommended patch cluster installed. The machine is connected to a Linksys WAG54G ADSL router/modem through RJ45 ethernet cable. The router also has windows XP machine connected through RJ45 ethernet cable. I also have another windows XP machine that connects to the router over wireless connection.
    I have opened up required ports on the router/port forwarding so that I can access the services remotely. I was first using default ports for http and ssh, but have now changed them to different ports - to be a bit more secure.
    I have created a domain name through dyndns.org.
    I have ssh running on the solaris 9 machine and has all the remote commands (rlogin, rsh, telnet) commented out in the /etc/inetd.conf and hence are not running on the machine.
    I have a UK ADSL servise provider called Pipex.
    Now lets get to the problem:
    The whole purpose of the above set-up is that I want to access sun machine from work. The whole set-up works perfectly well - for a little while and then something strange happens. At work, when I connect to the sun machine, everything works fine and when I leave the session idle for 15-20 minutes (could be less time), the connection drops and then I can not connect to the machine for good couple of hours. When I say connection drops, I do not mean that system displays a logout message or something - There is no response from the server - pressing of return key does not do anything and eventually I get a message on windows pop up that connection is disconnected. If I try to retry, the client tries for a while and then says that connection timed out. Same thing happens if I use the IP address � I use the right IP address as someone at home checks the router to confirms the correct IP address. This eliminates problem with domain name.
    I have tried everything and can not work out what is causing this problem - the machine has all the 9_recommended patches. To narrow the problem down, I set up apache server on the sun machine. Today, when the connection dropped, I tried to connecting to the apache server and it failed - 'page can not be displayed' message on the internet explorer. However, after couple of minutes, I managed to get to the website but still can not get login prompt through ssh client.
    What does that mean? Does it mean that server is playing up, or is it the sshd or is there any time out option in solaris 9... the strange thing is that I can access the web page - though it was not accessible at start when connection to ssh dropped out.
    Could it be the router? The linksys do not come with a rule based firewall... so there is nothing that states that disconnects after some inactivity. The port forwarding is working as I do get to login to the server and to the web server. It can not be changing the default port numbers as the problem was there when there were standard ports being used.
    It is not the link at my office as my friend, in a different company gets the same problem on my machine � connects to it and after some in-activity, the connection drops and then he can not login for a long time.
    It can not be the ADSL link as people at home can use the internet without any problem and they can access the sun machine locally.
    It can not be the windows machines connected to the router as problem is there when windows machines are switched off � don�t know if windows would cause this, but just wanted to eliminate anything that I could think of.
    One strange think that I did see yesterday was that, when I managed to login the last command showed that I was logged in throughout the time � the time when I could not logged in . The error message in the /var/adm/messages stated something like socket error and connection reset by peer or something � can not give you exact message right now as I can not login to the machine. The time on the message was couple of couple of minutes before I managed to login again and that time was the same as the time showed in last command is my logout time.
    Does anyone know what is causing all this problem? Any pointers or help will be appreciated. If there is any place else that you think I can get the answer, please kindly let me know.

    Thanks...
    A few new developments....
    - I opened 2 sessions to the server, left one with no activity and in the other session, I ran iostat 1... The session with no activity got dropped and iostat one carried on... When the session dropped, I managed to login straight away... so no delay of couple of hours. May be because iostat was still running?
    - I now have an ftp server running on windows and I can access it even when connection drops out... right now I have no access to sun... but ftp server is running fine.
    - I enable remote router access and I can access that as well...
    - I enabled telnet and I can not access the sun with telnet either.
    So, its either solaris 9 or the router.
    Tomorrow, I will connect an another sun machine and then see if connection to both is dropped or just one. If it is to both then it must be router as the way ssh, telnet work is different to the way ftp work - as someone told me this today... so if other sun machine is not accessable then its not sol9 but router. The other machine has Sol 2.5.1 running.
    Some one said that it could be that router is running out of translation table entries - but with so few connections? Or it could be that when there is no activity, router thinks that connection should be dropped - there is no open in the router setup which states that... Or Solaris has some timeout feature?
    More later.
    Kind Regards
    Ahmerin

  • Is there a way to access remote login and screen sharing logs?

    I have a very high suspicion that my macbook air has been accessed through remote login. Here's what happened. I closed my macbook air, letting it sleep, and left my house. After coming back I found it logged into the Guest account (which I didn't know was enabled). Remote login, Remote sharing and file sharing were enabled but I disabled them. I can't remember enabling them but maybe I did.
    I am also on a local network with about 8 other devices connected. I looked through /private/var/log/system.log but couldn't find anything concrete. I have yet to log out of the guest account and have connected to another internet connection just to be on the safe side. 
    My other user account is passworded and I could switch back to it from guest.
    So if my macbook was accessed through remote login, is there a way to tell from what IP address it came from?
    Please help me get to the bottom of this.

    May 20 13:03:44 XXXXXXXX-MacBook-Air.local loginwindow[51]: ERROR | ScreensharingLoginNotification | Failed sending message to screen sharing GetScreensharingPort, err: 1102
    May 20 13:03:44 XXXXXXXXMacBook-Air.local loginwindow[51]: USER_PROCESS: 51 console
    May 20 19:11:14 XXXXXXXXXXX-MacBook-Air.local loginwindow[51]: ERROR | ScreensharingLoginNotification | Failed sending message to screen sharing GetScreensharingPort, err: 1102
    I guess if it did happen it would have said so. Thanks anyway.

  • Administrative user can't access other accounts or delete remote login

    I have the administrative user account on my iMac at home. My daughter can't remember the new password I assigned her and needs me to change it. When I log into system preferences/accounts, it shows that I am the administrative user. However, when I try to access her account or the Guest account on the computer they are gray and I can't select them. I can't add any new accounts or delete any existing ones either.
    I also noticed that remote login SSH is turned on. I tried to uncheck that box multiple times but my iMac just freezes. I have to force quit system preferences.
    Any ideas on how I fix this?

    I enabled the root user. While now I can access the elements that were greyed out before, when I attempt to change something my Mac will freeze and just show the color wheel when I attempt to do something with the mouse. If I go up to the menu and pick Force Quit, the list shows System Preferences (the ap has stopped responding). I've shut system preferences with a force quit, rebooted several times and tried again but the same thing happens every time.
    I also can't get it to read a disc so I can't even reboot from my Mac OS system disc to do an archive and reinstall. Does it sound like my system, hardware or both? Is it something that I bundle off my iMac to a Mac Genius to fix?
    If this was a PC, I would swear that I had a virus.

Maybe you are looking for

  • Storage location MRP clarification

    this option gives you the ability to plan a storage location separately or exclude it completely from MRP. I am confused why the sloc mrp indicator is given at material master level in MRP4 view? it should be at storage location level right? also cou

  • Why does my flash player stop working when watching HD videos?

    I use Internet Explorer 9, but I've had this issue with all of the browsers. While trying to play an HD video, the box where the video is supposed to play disappears and I get a message that I need to download the newest version of Adobe flash. This

  • SCE for Sales order reserved Stock

    Hi Friends, During the SCE in CK40N, it is working fine for all materials except Sales order reserved stock. It is not updating the prices of Sales order stock prices in accounting view and not making valuation on the basis of new prices in MB52 stoc

  • Microsoft excel slow to load

    Microsoft excel is VERY slow to load when CC is enabled in start-up. Whenever I disable CC in the start-up the excel documents open normally. I see other users with the same problem but no obvious solution. Tried uninstalling cc in order to do a new

  • How can I see the list of the deleted files

    My brother thery probably deleted my web page... And I have to prove to my parents that is not a coincidence that he was the only guy at home and the best proof would be the time of the deleting. Is there any list of the files putted in the trash, or