Secure Shell SSH
Secure Shell SSH
Connect as <user>
to remote <host>
on specified <port>
If you do not specify a username it uses your current username
SSH Config
Location of SSH settings and host configuration
If the SSH directory does not exist create it at ~/.ssh
If an SSH config file doesn't exist create it at ~/.ssh/config
Add details for a host entry
Use SSH configuration
Add SSH key passphrase to MacOS Keychain
Note: If config
file cannot be edited using sudo
check the file is not locked via macOS Finder (File -> Get Info -> Locked)
SSH Access
Connect to remote machine using SSH public / private key instead of username and password.
On the remote machine, if there is no existing ~/.ssh
directory or ~/.ssh/authorized_keys
file, create one:
Then past your public key into the file and save.
If an authorized_keys
file exists, append your key to that file on a new line.
Last updated