Sharing Ilmu

Sharing for useful things

How To install and configure SSH ubuntu server 20.04 LTS

In this tutorial I’ll discuss about how to install and configuration ssh service on ubuntu server 20.04 LTS. SSH service is using for remote access connection so that you can access the server from another network or another place remotely. It can make your job easier.

Install ssh packet with openssh-server :

root@Taufik:~# apt-get install openssh-server

 

Configure SSH service :

root@Taufik:~# nano /etc/ssh/sshd_config

Locate the port config and then remove the hash mark (#) in from for enable the config. Default port number is 22 and you can custom these port number.

# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.

Include /etc/ssh/sshd_config.d/*.conf

 Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key

 

After that save and exit configuration. and then restart the service :

root@Taufik:~# systemctl restart ssh.service

 

Test access from your computer or another computer, Test ping from computer to your server first and make sure the computer can be access to your server ip.

To remote access if you using Windows OS,  use Putty  for ssh access to server.  if you use Linux desktop OS is no need additional software just use terminal for remote access.

Download PUTTY at link  https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html  Download the Alternative binary files.

Open Putty software. Type your ip server at HostName or IP Address then click Open.

 

Click accept on notification messange.

 

After that login using your user and password linux os.

Remote server from SSH is successfull.

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>