Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the setting method of SecureCRT key login linux ssh

2025-04-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article to share with you is about SecureCRT key login linux ssh setting method is how, Xiaobian think quite practical, so share to everyone to learn, I hope you can read this article after harvest, not much to say, follow Xiaobian to see it.

First, create a key with secureCrt

1. Create private and public keys using SecureCRT.

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

At this point, two files will be generated in the specified directory, for example, the private key my_rsa and the public key my_rsa.pub.

2. Linux server to establish.ssh directory, under normal circumstances, already has this directory

# mkdir /root/.ssh

# chmod 700 /root/.ssh

3. Transfer public key my_rsa.pub to linux server, convert SSH2 compatible public key to Openssh compatible format

# ssh-keygen -i -f Identity.pub >> /root/.ssh/authorized_keys2

# chmod 600 /root/.ssh/authorized_keys2

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

5. Restart SSH Server on Linux Server

#service sshd restart or else/etc/init.d/ssh restart

6. Since the key login has been set, the original password login can be completely removed.

$ sudo vim /etc/ssh/sshd_config

Protocol 2 /Allow SSH2 only

PubkeyAuthentication yes /* Enable PublicKey authentication

AuthorizedKeysFile .ssh/authorized_keys2 /*PublicKey file path

PasswordAuthentication no /* Disable password authentication login

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

Note: The conversion key format in step 3 is easy to ignore, please pay more attention to this point.

Second, share the private key created

Because the private key created by securecrt is in a different format than the private key used by winscp, conversion is required.

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

Save the key pair in openssh format, then run puttygen>> Convertions>>Import key in winscp package to select the private key just converted, enter key passphrase, select Save private key, save it as ppk file

III. Solve the Chinese garbled code problem of winscp

Check the Advanced option on the WinSCP splash screen, then turn off the Server does not use UTF-8 encoding option on SFTP settings.

The above is how SecureCRT login linux ssh setting method is, Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report