Install and configure SSH server for Ubuntu 16.04

  • Intall SSH Server:

$ sudo apt install openssh-server

  • Change SSH Port, if needed:

$ cd /etc/ssh/

$ sudo nano sshd_config

The change port number, save and exit.

  • Restart SSH service:

$ sudo systemctl restart ssh

  • Open SSH session to control another machine:

$ ssh hostname@host_ip_address -p ssh_port

  • Temporary let ssh session (that is controlling a remote host) run under background (i.e. a special command to suspend the SSH client):

Press “–” (Shift -),  “Enter", then “~", followed by “Ctrl-Z"

  • Re-enter interactive mode after Ctrl-Z (i.e. back to the process that is let running in background after press Ctrl-Z):

Type “fg” and hit “enter” in terminal.

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s