SSH is the name of the protocol and the program that allows you to connect to a server or computer remotely and securely through an encrypted information channel.
From macOS or Linux it is possible to use it from the terminal, and from Windows it is necessary to install a client like Putty or Cygwin .
From macOS or Linux it is possible to use it from the terminal, and from Windows it is necessary to install a client like Putty or Cygwin .
Install SSH Server in Ubuntu
sudo apt-get install openssh-server
We can install the client toosudo apt-get install openssh-client
Operations
Tear
sudo systemctl start sshd.service
Stop
sudo systemctl stop sshd.service
Restart
sudo systemctl restart sshd.service
That the service starts with the system
sudo systemctl enable sshd.service
See status
sudo systemctl status sshd.service
Access the configuration file
nano / etc / ssh / sshd_config
See status
sudo systemctl status sshd.service
Access the configuration file
nano / etc / ssh / sshd_config
How to connect from a console
ssh user @ server_ip
Security
By default, the SSh server will use port 22. We can change it to another one in the / etc / ssh / sshd_config file . This does not increase security by itself, but it helps to pass unnoticed by bots or other programs that scan the network.
Another parameter that we can configure is PermitRootLogin no . This will not allow us to connect to the root user, which would be the one that any bot would try to use to enter. We could always raise our permissions using sudo .
Other parameters to consider:
- LoginGraceTime sets a time limit to insert the password.
- MaxAuthTries sets a number of attempts allowed before disconnecting.
- MaxStartups establishes a number of logins from the same IP simultaneously.
- AllowUsers establishes a list of users who can login.
- DenyUsers establishes a list of users who cannot log in
Report