Setting up SSH access for your new VPS/Enterprise Account - Mac
Last Updated -
NOTE: PC users please review this article
In order to access your new VPS server, there are a few steps that need to be completed. By Using your SSH key and agent forwarding you will not have to enter a password when connecting to your server. This is also a more secure way of connecting as opposed to using a password.
1. Generate an SSH key if you do not have one.
2. Enable SSH agent forwarding
3. Follow this article for adding the Key within Atomic. (The key needed is normally ~/.ssh/id_rsa.pub)
1. Generating New SSH Keys:
Open your Terminal or SSH shell and enter
ls -al ~/.ssh
If you see id_rsa.pub or id_dsa.pub then skip to step #2. If the directory is empty please follow these steps
ssh-keygen -t rsa -C "email@example.com" # Creates a new ssh key, using the provided email as a label # Generating public/private rsa key pair. # Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
Next you'll be prompted for a passphrase
Enter passphrase (empty for no passphrase): [Type a passphrase] # Enter same passphrase again: [Type passphrase again]
After you enter the passphrase you should see this.
Your identification has been saved in /Users/you/.ssh/id_rsa. # Your public key has been saved in /Users/you/.ssh/id_rsa.pub. # The key fingerprint is: # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db firstname.lastname@example.org
2. Add your key to the ssh-agent
# start the ssh-agent in the background eval "$(ssh-agent -s)" # Agent pid 59566 ssh-add ~/.ssh/id_rsa
2a. With the text editor of your choice open up
if this file does not exist you can create it in your terminal with.
Add the following text to the file replacing example.com with your server IP
Host example.com ForwardAgent yes
3. Copy your public SSH key and add the key within Atomic.
pbcopy < ~/.ssh/id_rsa.pub
Copies the contents of the id_rsa.pub file to your clipboard
Paste the key into Atomic following this article.
Once the key is installed via Atomic, you are ready to connect.
$ ssh username@your_server_hostname