How to connect to Ubuntu server with SSH

Posted on December 9, 2019

SSH, or Secure Shell, is a protocol used to securely log onto remote systems. It is the most common way to access remote Linux and Unix-like servers.

Install SSH server on your Ubuntu server

First must install SSH server to Ubuntu

sudo apt-get update
sudo apt-get install openssh-server

And you can start it with

sudo systemctl start ssh

In order to configure SSH run

nano /etc/ssh/sshd_config

For changes in configuration to ake effect, must restar SSH server

service ssh restart

Connect remotely with SSH

To access remotely the Ubuntu server from another terminal type

ssh username@remote_host_ip

If you use the same user in both of the computers can use just

ssh remote_host_ip

And finally, anytime can disconnect from the remote server with the command

exit

 

More info

https://www.digitalocean.com/community/tutorials/how-to-use-ssh-to-connect-to-a-remote-server-in-ubuntu

https://help.ubuntu.com/lts/serverguide/openssh-server.html

http://linux-sys-adm.com/how-to-install-and-configure-ssh-on-ubuntu-server-14.04-lts-step-by-step/