SSH Secure Access

Source: Internet
Author: User
SSH Secure Access-Linux Enterprise Application-Linux server application information. For more information, see. . Use SecureCRT to create the private key and public key.

SecureCRT: Quick Connect-> Authentiation-> Public Key-> Properties-> Create Identity File-> DSA/RSA-> Set Passphrase-> Done



At this time, two files are generated in the specified directory, for example, the private key my_rsa and the Public Key my_rsa.pub.



2. Create a. ssh directory on the linux server. Normally, this directory already exists.

# Mkdir/root/. ssh
# Chmod 700/root/. ssh




3. Upload the Public Key my_rsa.pub to the linux server and convert the public key in the SSH2 compatible format to the Openssh compatible format.



# Ssh-keygen-I-f Identity. pub>/root/. ssh/authorized_keys2
# Chmod 600/root/. ssh/authorized_keys2



4. Set the logon mode to PublicKey in SecureCRT and select the my_rsa file you just created as the private key.



5. Restart the SSH server on the Linux Server

# Service sshd restart or/etc/rc. d/init. d/sshd restart



6. Because you have set a key to log on, you can remove the original password.



# Vi/etc/ssh/sshd_config



Protocol 2/Only SSH2 is allowed
PubkeyAuthentication yes/* enable PublicKey Authentication
AuthorizedKeysFile. ssh/authorized_keys2/* PublicKey file path
PasswordAuthentication no/* password verification prohibited Login



PS: the above steps use the key pair generated by SecureCRT for Logon verification. In fact, you can also use the key generated by the ssh-keygen command on the server. After the key pair is generated, convert the format to the SSH2 format used by SecureCRT

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.