[Network security]How to encrypt communication across the network

Takahiro Oda
3 min readDec 29, 2021

overview

I demonstrated

  • Enabling Secure Shell (SSH) for remote access
  • Locking down remote access

Become root user

Check that ssh process is running with the ps command

Use putty from the windows ten machine to log in to the Ubuntu server (192.168.100.245) with port 22.

Successfully, login into the Ubuntu server as a cast user.

Use WinSCP to transfer files to the ubuntu server securely.

Capture the connection at the packet level using Wireshark

Type “gedit /etc/ssh/sshd_config &” to open the sshd config with gedit.

Get the backup before changing it.

Change from 22 to 4000

Restart sshd process

Check the change with “lsof -I |grep sshd” command

Generate rsa key with putty keygen.

Copy the public key from Windows 10 to the Ubuntu server.

Move the public key from Desktop to /ssh/ directory.

Convert the copied file into OpenSSH format.

Create .ssh directory

Move the public key under the .ssh directory

Configuration change In /etc/ssh/sshd_config

Restart ssh

From Windows 10, open putty and auth section. It will choose a private key.

Summary

Maintaining secure connections in the enterprise architecture is essential, such as remote access and file transfers. If it is not encrypted, the content can be seen as a clear text using Wireshark, and confidentiality will be violated.

It is possible to configure secure remote access by configuring a secure connection using ssh between clients and servers, as shown in the screenshots. Moreover, suppose we use the PKI system. In that case, secure remote access will be guaranteed using public and private keys so that the system admin can provide another layer of security for the servers.

--

--