Site TIPS PAGE🔎   UP ONE LEVEL
 OJB's Web Site. V 2.1.tip tips mac owen2 
Tip

Up to OJB's Mac Tips List

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).

Related Tips

Terminal Example: Listing Files
Terminal Example: Shell Script
Terminal Tips: Deleting Files
Terminal: Change Priority
Terminal: Changing Privileges
Terminal: Fixing a Hang
Terminal: Listing Directory
Terminal: Manual and Help
Terminal: Terminate a Process
Terminal: Top Processes



My latest blog post: Too Much Control: The last thing we need is a government with too much control. (posted 2025-12-11). My latest podcast: OJB's Podcast 2025-11-06 Democracy v Bureaucracy.
 ©2025 by OJBBlogMS Free ZoneMac Made
T: 15. H: 863,639,694
Features: RSS Feeds Feedback LogMod: 07 Jun 2024