How To Use SSH To Connect To A Remote Server In Linux
Use SSH To Connect To A Remote Server In Linux
Secure Shell (SSH) is a cryptographic network protocol used for a secure connection between a client and a server.
In this tutorial, we’ll show you how to enable SSH on an Ubuntu Desktop machine. Enabling SSH will allow you to remotely connect to your Ubuntu machine and securely transfer files or perform administrative tasks.
Step 1:
Open your terminal by clicking on the terminal icon.
Step 2:
Install the ssh package on Ubuntu by typing: sudo apt install openssh-client
Step 3:
Enable ssh server on Ubuntu, run: sudo systemctl enable ssh
Step 4 :
By default, the firewall will block ssh access. Therefore, you must enable ufw and open ssh port type this command:
sudo ufw allow ssh
Step 5:
The following are the commands for the management of ssh client
To start service run this command: sudo systemctl start ssh
To stop service run this command: sudo systemctl stop ssh
To Restart the service run this command: sudo systemctl restart ssh
To check service status run this command: sudo systemctl status ssh
To disable service run this command: sudo systemctl disable ssh
To stop service run this command: sudo systemctl stop ssh
Step 6:
Congratulations, You learned how to install and enable ssh client and server on your Ubuntu Linux desktop and server.
Post a Comment