Use SSH port forwarding to achieve remote access to network hosts Remote Desktop (B) dense-free SSH login

Before we use SSH to forward to establish a remote SSH forwarding, followed by production of a certificate configuring a free SSH secret landing.

Log server command line, generate the certificate.

# Generate a certificate, Triple-Enter, .ssh folder generated in the current directory that contains a public key and a private key id_rsa id_rsa.pub 
[iZwz9ds6obifn90aw8j2khZ the root @ ~] # SSH-keygen -t RSA 
# added to the public key trust secret key server 
[root @ iZwz9ds6obifn90aw8j2khZ ~] # Touch /root/.ssh/authorized_keys 
[root @ iZwz9ds6obifn90aw8j2khZ ~] # CAT /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

WinSCP will need to use the private key /root/.ssh/id_rsafile downloaded to the local.

Unrecognized Putty ssh-keygen generated private key, the need for id_rsaa file format conversion. Open PuTTY-gen, select Load to load id_rsa, and then click Save private key button to save, you can get ppk PuTTY private key file can be identified.

image

In the putty into the main interface Connection-Data, enter the login user in the Auto-login username. Switch to the Connection-SSH-Auth, select just saved ppk private key file in the Private key file for authentication.

image

The next time you log in is no longer prompted for a user name and password.

image

Guess you like

Origin www.cnblogs.com/lunarflyer/p/11569738.html