Friday, October 9, 2015

Step by Step Guide to Remote into Ubuntu

To be able to remote into Ubuntu, openssh-server must be installed. To do this, simply type in
$ sudo apt-get install openssh-server
from the terminal. This will install the package and start the server.

In order to check the IP address of the server, enter
$ ifconfig
This command will show the IP address under eth0 inet addr. Make a note of this IP address. In my case, it is

From the client side, use ssh client or putty to connect to the server.
When using ssh, enter the following command in the client terminal
$ ssh <server_user_name>@<server_IP_address>
Here, replace <server_user_name> with the Ubuntu login user name, and <server_IP_address> with the IP address that you have made a note of. Accept RSA prompt by typing yes, and enter the login password of the server.

If your client runs Windows, you can use PuTTY in place of ssh client. Download and install it from
Run PuTTY and enter the IP address of the server and click Open. Accept RSA, enter the username and password, and finally you have successfully remoted in!

You should be remotely logged into the server. The command
$ pwd
will display the current directory (in the server), while
$ whoami
will display the current user (in the server).
To exit the remote session, simply enter
$ exit
You should be back to your client.

Now, you can control Ubuntu remotely! Any terminal commands that you execute on the server locally can be done exactly the same remotely. For example, try installing google chromium browser on the server via remote commands. That is, ssh into the server again, and simply enter
$ sudo apt-get install chromium-browser
You can verify that you can do this! Unfortunately, however, you can only run terminal applications remotely. This is one of the most main reasons that we will need to be familiar with terminal editor, such as vim!

No comments:

Post a Comment