How to SSH to Server via Linux

Ray Leon
by Atlantic.Net (2posts) under Cloud Hosting
Verified and Tested 09/27/2015


In this article we will walk you through on how-yo SSH into your Linux Server from another Linux Server. SSH is a cryptographic network protocol that was made to replace telnet and allows local computer to authenticate with a remote server.


Linux Server with SSH running.

Second Linux server with SSH running.

If you do not have a server already, check out our cloud hosting selection and spin a new server up in under 30 seconds.

How to SSH into your Linux Server from another Linux Server.

First, you will need to log into your first Linux Server.  If you are unsure on how to log into your Linux Server from your Windows computer, please visit this article

You will then be prompted to enter your Username and Password for the server. For security reasons, the password is not shown as you type.

Once logged into your first Linux server, to SSH into your second Linux server you will run the following command: ssh <ipaddress>. Below is an example.



By default, when a user is not specified, you will be connecting using your current user on the device initiating the SSH connection.

If you want to connect to the second Linux server but with a different user other than the root user, you would run the following command: ssh [email protected]<ipaddress>

ssh [email protected]

When connecting to the second Linux server from the first Linux server for the first time, you will be prompted to add the server’s key fingerprint to the list of known hosts.


How to SSH into your second Linux server

If you trust the second Linux server you are connecting to then you will type “yes” and press enter. Next, you will be prompted to enter the password of the user you are trying to use on the second Linux server. Once you enter the correct password, you will be logged into your second Linux server from the first Linux server.

Other fun commands when using SSH.

  1. If you are using a custom SSH port for the second Linux server, you would need to specify the port number.
ssh [email protected] -p222

2.   Transfer SSH public key to another machine in one step

ssh-keygen; ssh-copy-id [email protected]; ssh [email protected]

This will allow you to login to your second Linux server without having to use a password next time.

Thank you for following along in this tutorial! Please check back for more updates and try one of Atlantic.Net’s best Cloud hosting solutions.

Not sure what you need?

Get a free consultation today!

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom


We use cookies for advertising, social media and analytics purposes. Read about how we use cookies in our updated Privacy Policy. If you continue to use this site, you consent to our use of cookies and our Privacy Policy.