Linux SSH login command

  

The ssh command is used to remotely log in to a Linux host.

Common format: ssh [-l login_name] [-p port] [user@]hostname can be viewed in more detail with ssh -h.

Example

Do not specify user:

ssh 192.168.0.11

Specify user:

ssh -l root 192.168.0.11< Br>

ssh [email protected]


If you have modified the ssh login port, you can:

ssh -p 12333 192.168.0.11

ssh -l root -p 12333 216.230.230.114

ssh -p 12333 [email protected]

Also modify the configuration file /etc/ssh/sshd_config to change the ssh login port and disable Root login. Changing the port prevents port scanning.

Edit configuration file:

vim /etc/ssh/sshd_config

Find #Port 22, remove the comment and change it to a five-digit port:

Port 12333

Find #PermitRootLogin yes, remove the comment, change to:

PermitRootLogin no

Restart sshd service:

service sshd restart

Copyright © Windows knowledge All Rights Reserved