Basic instructions for SSH connecting to a server

We bring you the next part of the SSH server setup guide series . In the previous parts, we got acquainted with the basics of SSH connection , we showed how to generate and copy the key . In this section, we’ll cover some basic instructions on how to SSH into a server.

Connecting to a remote server

To connect to a remote server and open a shell session to it, issue the ssh command.

In its simplest form, it assumes that the username on the local device is the same as the one on the remote server. If so, you can connect using:

 

If the username on the remote server is different, you will need to pass the remote username, like here:

 

When you contact a new host for the first time, you’ll see a message that looks like this:

The authenticity of .
Are you sure you want to continue connecting (yes/no)? yes

Accept remote host authentication

 

If you are using password authentication, you will be prompted to enter the password for the remote account. If you are using SSH keys and the private key has a passphrase set, you will be prompted to enter it. Otherwise, you will be logged in automatically.

Running a single command on a remote server
To execute just a single command on the remote server, not spawn a shell session, add this command after the connection information, like here:

 

You connect to the remote host, authenticate with your credentials, and execute the command you specified. The connection is then immediately closed.

Logging in to a server with a different port
The SSH daemon runs on the server by default on port 22. The SSH client will assume this is the case when it tries to connect. If the SSH server is listening on some non-standard port (we will demonstrate this in one of the later sections), you will need to specify a new port number when connected to the client.

emote server, create or edit a singapore phone number data configuration file in the inside your local computer’s home directory.

Edit or create that file now by typing:

phone number data

 

Here you can then set host-specific our top amazon brands and plans for them configuration options. To specify a new port, use a format like here:

This allows you to login without having bw lists to specify a specific port number on the command line.

Scroll to Top