In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how SecureCRT uses ssh key login configuration, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.
Server-side configuration
OS: Debian-6.0.5
The code is as follows:
# apt-get install ssh installs ssh service
Edit / etc/ssh/sshd_config configuration file
The code is as follows:
Port 3322 # modify port to 3322 (custom)
PermitRootLogin no # prohibits root users from logging in remotely
PubkeyAuthertication yes # allows login with key
PasswordAuthertication no # prohibits remote ssh clients from logging in with a password
Iptables setting enables port 3322 to allow access
The code is as follows:
Iptables-I INPUT-p tcp-- dport 3220-j ACCEPT
Method 1: the administrator generates key for ordinary users on the server side
(if there is no user, create a new user first. Debian with adduser)
For example, generate ssh key for user name and fengzhige
The code is as follows:
Adduser fengzhige # add user
Su-fengzhige # Log in as fengzhige user
Using ssh-keygen to generate key
The code is as follows:
Ssh-keygen-t rsa # generates key of type RSA
Root@debian-2:~# su-fengzhige
Fengzhige@debian-2:~$ pwd
/ home/fengzhige
Fengzhige@debian-2:~$ ssh-keygen-t rsa
Generating public/private rsa key pair. Enter file in which to save the key (/ home/fengzhige/.ssh/id_rsa): fengzhige-key
Enter passphrase (empty for no passphrase):
Enter same passphrase again: Your identification has been saved in fengzhige-key.
Your public key has been saved in fengzhige-key.pub. The key fingerprint is: f1:f5:5c:59:aa:4d:7d:b2:9a:56:c8:bc:50:8b:87:80
Fengzhige@debian-2 The key's randomart image is:
+-[RSA 2048]-+
|. |
|. Oo |
| | E o o +. + |
| | + BO +. |
| | S = B * | |
| | o = |
| = |
|. | |
| | |
+-+
Fengzhige@debian-2:~$
Set the public key
The code is as follows:
The key generated by ssh-keygen under debian will be in the current directory:
(fengzhige-key Private fengzhige-key.pub Public)
Cd / home/fengzhige
Cd .ssh # create a new .ssh directory, and put the public key here
Cat id_key.pub > > authorized_keys # changed to the specified file name authorized_keys
Save the private key to the client with SecureCRT.
Connection:
The above is how SecureCRT uses ssh key login configuration. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.