1.9 Remote connection to Linux using Putty
1. Remote connection to Linux using putty
Login:
1.10 using Xshell to connect to Linux
1. Remote connection to Linux using Xshell
1.11 Putty Key authentication
1, Putty key authentication
The private key is one by one corresponding to the public key;
Generating the key environment
The private key should be kept in a safe place;
The public key can be copied under
Generate key:
[Email protected] ~]# MKDIR/ROOT/.SSH
[Email protected] ~/.ssh]# chmod 700/root/.ssh
[Email protected] ~/.ssh]# Vim/root/.ssh/authorized_key
Save Exit--Save public key
Shutting down the firewall
[[email protected] ~/.ssh]# Setenforce 0---/temporarily close SELinux Firewall/
Re-open Putty
1.12 Xshell key authentication
1, in the Xshell tool---New User key Generation wizard
Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqea5rwz81s+vvpljnhx3drpo8/ hl3pmhgtnytaakyly1xtn9q1qsnkuwvjrutplyyuylpehwtr0kjtu8u4kbvuggbp/im1w0ybov+xpbh5kz8v4pbvsdfva9/ 7atwqgogdijdgx11duaes8ei/hlx2h1v2vbqnhturk3f2ikgkeiwszuqpe9k+ no6yjn0wfy5mhsjzrlluxueyvefyssipmck2wr6sxqprntgjf1lnpwgliipl/ qwx6m0mifnnp7cpowwz8z9djtm2rxozxib3lnnvgovnsihkza93iof6a7fdwweyrjs/b1ephahvtwvyxnjkj0mnol9nvqhwqya97tw==
Edit the Authorized_key file in the. ssh directory again.
[Email protected] ~/.ssh]# vim Authorized_key
[email protected] ~/.ssh]# cat Authorized_key
Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqea5rwz81s+vvpljnhx3drpo8/ hl3pmhgtnytaakyly1xtn9q1qsnkuwvjrutplyyuylpehwtr0kjtu8u4kbvuggbp/im1w0ybov+xpbh5kz8v4pbvsdfva9/ 7atwqgogdijdgx11duaes8ei/hlx2h1v2vbqnhturk3f2ikgkeiwszuqpe9k+ no6yjn0wfy5mhsjzrlluxueyvefyssipmck2wr6sxqprntgjf1lnpwgliipl/ qwx6m0mifnnp7cpowwz8z9djtm2rxozxib3lnnvgovnsihkza93iof6a7fdwweyrjs/b1ephahvtwvyxnjkj0mnol9nvqhwqya97tw==
And then re-login in the Xshell.
Remark Description:
This is actually ssh-free login
The following example:
1. Springboard machine:
[[Email protected] ~]# CD. ssh/
[Email protected]]# ls
Authorized_keys Id_rsa id_rsa.pub known_hosts
[email protected]. ssh]#
[email protected]. ssh]#
[email protected]. ssh]#
[email protected]. ssh]# Ls-al
Total 260
drwx------2 root root 4096 2 17:52.
Dr-xr-x---root root 4096 2 16:32.
-rw-r--r--1 root root 832 Nov Authorized_keys
-RW-------1 root root 1671 Apr Id_rsa
-rw-r--r--1 root root 424 Apr id_rsa.pub
-rw-r--r--1 root root 244248 2 22:31 known_hosts
[email protected]. ssh]# ls-a
. .. Authorized_keys Id_rsa id_rsa.pub known_hosts
[email protected]. ssh]# ls
Authorized_keys Id_rsa id_rsa.pub known_hosts
[email protected]. ssh]# Cat Id_rsa.pub
Ssh-rsa aaaab3nzac1yc2eaaaabiwaaaqea2dlgh1s4dcfgyyyoq5pcovd3xjgh6f6qbvizz8amqc7k3khtnk067gw3d6h8uv4aa4vro4rfrek4kqvl+ cnsceyagdoj1kappofsypawjt4xblizc086qhejpxxep5hdtywd3law/ glyl5rgvdz5p1tjtmi5t6vqwxtiossq1nymqbtik5s4klxpbqqgfbmxxjwoelatmzxfufp9k4nsl7wdsls+ Dwpqslk4bgf2yckw3e6tqlcio51n2lja8w7mdh1ueq8jxxblodp/y0wh+yu8zlo3qttxchaigk32436aek7p1o64vp2qf9ui6cqfbrhnfu0l2c /jgdvypx8ejq== [email protected]
If you do not have a file for RSA, you can use the following command to generate:
[email protected] 01:~$ ssh-keygen-t RSA
On the server side
[[email protected] ~]# mkdir. SSH
Cd. SSH
[email protected]. ssh]# Vim Authorized_keys
Copy the above RSA information into the key;
[email protected]. ssh]# Vim/etc/hosts.allow
Add the IP address to the inside
SSH Password-free login
Password-Free login settings
1. Go to my home directory CD ~/.SSH
2. Generate SSH Free login key ssh-keygen-t RSA (four carriage return)
After executing this command, two files Id_rsa (private key), id_rsa.pub (public key) will be generated
3. Copy the public key to the machine to be free of landing
4. Add the public key to the Authorized_keys in the. SSH folder under which you want to avoid landing the machine, and make sure that the file permissions are 600.
Cat Id_rsa.pub >> Authorized_keys
1.9 Using Putty remote connection linux;1.10 using Xshell connection linux;1.11 PuT