Thursday, May 9, 2019

How to install SSH server to Ubuntu?

Installation

1. Update package list of apt from the repository

$ sudo apt update



2. Install openssh-server. Flag y means that it will assume all the answer will be “yes” from the prompt during installing.

$ sudo apt install -y openssh-server

3. Using the following instruction to check whether the ssh server is running or not

$ sudo systemctl status ssh

4. Also, you can use the following commands to manipulate ssh server

$ sudo systemctl start ssh
$ sudo systemctl stop ssh
$ sudo systemctl restart ssh
$ sudo systemctl disable ssh
$ sudo systemctl enable ssh

Testing

1. Get the IP address from the remote which launched ssh server

$ ifconfig

2. (Windows)Using PuTTY to connect it. Enter the IP address gotten from step 1 and select the SSH as connection type.


3. (Linux) Using the following instruction (remember to replace <Username> and <Server IP address> to yours)

             $ ssh <Username>@<Server IP address>

4. Then you can see the login information.


No comments:

Post a Comment