Note: You are currently viewing my old web site. There is a new version with most of this content at OJB.NZ.
The new site is being updated, uses modern techniques, has higher quality media, and has a mobile-friendly version.
This old site will stay on-line for a while, but maybe not indefinitely. Please update your bookmarks. Thanks.


[Index] [Menu] [Up] Title[Header]
Tips

(Up to OJB's Mac Tips List Page)


Terminal: Remote Secure Login

Its useful to be able to connect to other Mac computers over the Internet or LAN and use the command line to view and control them. Using a secure connection means you can safely type passwords, etc without your typing being viewed by anyone else. For example, if another machine isn't responding you could try connecting to it and listing the running processes, then you could kill any processes which look problematic.

To use remote login you need to setup the computer you want to connect to. Go to the System Settings, then General, then Sharing (or just System Preferences, then click the Sharing icon for system prior to Ventura), then make sure the Remote Login option is on. You will also need to know an administrator's username and password for that computer.

To connect to the computer from another one use the "SSH" (secure shell) command. Both computers have to be connected to the network or Internet, of course. Also many firewalls might stop SSH communications on port 22. Type "ssh user@computer", where user is the user name and computer is the computer name or IP address. For example, to connect to owen3.otago.ac.nz as owen, enter "ssh owen@owen3.otago.ac.nz". If the computer doesn't have a domain name use its IP address instead.

When you connect to the other machine you will need to accept the signature if this is the first time you have connected. Commands you type will go to the remote computer - you can run programs, create files or do anything else described in these pages. To try to fix "hung" or slow computers, use the "top -u" command to view processes using the CPU, then the "kill" command to stop the problematic process (see the other terminal tips for details).


[Up]

[Contact][Server Blog][AntiMS Apple][Served on Mac]