How to Connect to your Server with OpenSSH

To connect to your server, you’ll need to open a terminal. How you do this varies between operating systems and window managers, but generally:

  • Linux: Search Terminal or press CTRL+ALT+T.
  • macOS: Search Terminal.
  • Bash on Windows: Search Bash. If you don’t have Bash on Windows, use PuTTY instead.

Once the terminal is open, enter the following SSH command. Make sure to substitute in your Droplet’s IP address after the @. If you’re using CoreOS, Rancher, or FreeBSD, the username is corerancher, or freebsd instead of root, respectively.

ssh [email protected]

If you have multiple SSH keys, you may need to specify the path of your private key using the -i flag, as in ssh -i /path/to/private/key [email protected]1.25.0.53. Make sure to substitute the path to your private key.

The very first time you log in, the server isn’t identified on your local machine, so you’ll be asked if you’re sure you want to continue connecting. You can type yes and then press ENTER.

The authenticity of host '1.25.0.53 (1.25.0.53)' can't be established. ECDSA key fingerprint is SHA256:IcLk6dLi+0yTOB6d7x1GMgExampleqX3AiNh6/J6Kwp. Are you sure you want to continue connecting (yes/no)? yes

Next, a host key fingerprint is saved to your local machine and you’ll receive this confirmation:

Warning: Permanently added '1.25.0.53
' (ECDSA) to the list of known hosts.

 

Note

You may receive an intimidating-looking remote host identification warning:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.

If this happens, you can delete the old Droplet’s host key from your local system with the command ssh-keygen -R 1.25.0.53 and then reconnect.

 

The next part of the connection process is authentication. If you’ve added SSH keys, you’ll connect to the server immediately (or after entering the passphrase for your key pair).

If you haven’t added SSH keys, you’ll be prompted for your password:

[email protected]'s password:

When you enter your password, nothing is displayed in the terminal, so it can be easier to paste in the initial password. Pasting into text-based terminals is different than other desktop applications and is also different from one window manager to another:

  • For Linux Gnome Terminal, use CTRL+SHIFT+V.
  • For macOS, use SHIFT-CMD-V or the middle mouse button.
  • For Bash on Windows, right-click on the window bar, choose Edit, then Paste. You can also right-click to paste.

Once you’ve entered the password, press ENTER.

When you’ve successfully logged in, you’ll receive an operating system-specific welcome screen. Your command prompt changes to display the username you’ve logged in as, separated by the @ symbol from the hostname of the server, like root[email protected]:~#.

If you’re having trouble connecting to your server with SSH, you can try connecting with the server console to recover normal SSH access or open a support ticket from client area.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?