How to SSH on Mac?
Instructions on how to SSH to a server on Mac.
In the examples here we are setting up the ssh connection to the server mercury.ucdavis.edu
. We are also using the ssh key stored at ~/.ssh/mercury
you can change these to match the server and key you are using.
- Launch the Terminal and run the following commands:
cd ~/.ssh nano config
- It should now take you to a text editor in your terminal. Type the following:
Remember to change theusername
to your username for mercury and the IdentityFile to your private keyHost mercury.ucdavis.edu User username IdentityFile ~/.ssh/mercury
- Press
Control + X
and follow the on screen instructions to save your file
You have now set up your ssh connection.
You can ssh to the server by running ssh your.server.name
in the terminal:
For example:
ssh mercury.ucdavis.edu