SecureCRTkey logon linuxssh settings

Source: Internet
Author: User
Tags ssh server
Article Title: SecureCRTkey logon linuxssh settings. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. Use secureCrt to create a key

1. 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/init. d/ssh restart

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

$ Sudo vim/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

Note: The conversion key format in step 3 is easy to ignore. Pay attention to this.

2. Share the created private key

The private key created by securecrt is different from the private key format used by winscp.

Securecrt> tools> Convert Private Key to OpenSSH Format...

Save the key pair in openssh format, run puttygen> Conversions> Import key in the winscp package, select the converted private key, enter the key passphrase, and select Save private key, save as a ppk File

Iii. Solve Chinese garbled characters in winscp

On the WinSCP boot screen, first check the advanced options, and then disable the server on SFTP settings without using the UTF-8 encoding option.

Original address http://www.ixdba.net/article/ba/1829.html

Related Article

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.