First, if not installed, then apt-get install SSH on the command line
After a while, you can actually log on to the SSH service machine.
The command to open the SSH service is: sudo/etc/init.d/sshd restart (generate public-private key pair)
View SSH status command: sudo/etc/init.d/sshd status
If you do not start the sshd daemon, you only need: sudo/usr/sbin/sshd (no need to do each)
At logon time, the command: SSH (other IP)-L (the other machine has the user name)-p (port number)
Where the parameter-l-p are not required. If the current user name has the same name as the user on the other machine that you want to log on to, then the-l parameter is not required, and the port defaults to 22 and is usually not set.
Common format: SSH [-l login_name] [P port] [user@]hostname
More details can be viewed with ssh-h.
Example
Do not specify User:
SSH 192.168.0.11
Specify the User:
Ssh-l Root 192.168.0.11
SSH root@192.168.0.11
If you have modified the SSH login port
Ssh-p 12333 192.168.0.11
Ssh-l Root-p 12333 216.230.230.114
Ssh-p 12333 root@216.230.230.114
In addition, modify the profile/etc/ssh/sshd_config, you can change the SSH login port and prevent root login. Changing the port can prevent the port from being scanned.
Edit configuration file
Vim/etc/ssh/sshd_config
Find #port 22, remove the annotation, and modify it into a five-bit port:
Port 12333
Find #permitrootlogin Yes, remove the comment, and modify it to:
Permitrootlogin No
Restart the SSHD service:
Service sshd Restart
Aliases can be used by users to customize their commands. Edit Vim ~/.BASHRC
Alias ll = ' Ls-l '
SOURCE ~/.BASHRC command takes effect