当前位置:网站首页>SSH password free login
SSH password free login
2022-07-28 22:30:00 【5xp_ two thousand and one】
Recent synchronization django Configuration requires secret free synchronization nas Catalog The configuration is sorted as follows
SSH Three steps to solve the secret free login
- 1. The client generates public and private keys
- 2. Upload public key to server
- 3. Test password free login
1. The client generates public and private keys
Local clients generate public and private keys :( Return all the way by default )
ssh-keygen
- 1
The above command will be in the user directory .ssh Create a public / private key folder
cd ~/.ssh
- 1
ls
- 1
Create two keys under :
- id_rsa ( Private key )
- id_rsa.pub ( Public key )
2. Upload public key to server
The server address used for the test here is :192.168.235.22
The user is :root
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
- 1
The above command is written to the server ssh The list goes down
cd ~/.ssh
- 1
vim authorized_keys
- 1
You can see that the client writes to the server id_rsa.pub ( Public key ) Content .
3. Test password free login
ssh [email protected]Client pass ssh Connect to remote server , You can log in without password .
Add
[[email protected] .ssh]# ssh-copy-id -i ./id_rsa.pub "-p 58422 [email protected]"
Reference resources https://www.cnblogs.com/chuyiwang/p/10729591.html
Report errors
ssh-copy-id -i ./id_rsa.pub -p 41022 [email protected]
Bad port 'umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys && (test -x /sbin/restorecon && /sbin/restorecon ~/.ssh ~/.ssh/authorized_keys >/dev/null 2>&1 || true)'
Report a mistake again
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
d5:e0:49:db:cb:ce:09:99:38:b6:7f:20:9a:b6:a6:35.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:5
RSA host key for [101.200.120.97]:41022 has changed and you have requested strict checking.
Host key verification failed.
terms of settlement It's empty known_hosts file test ssh Password login is normal Use the default id_rsa Write... Manually authorized after ok
边栏推荐
猜你喜欢

示波器发展史中的变化

Static details of static members

What is time complexity

基于Ernie-3.0 CAIL2019法研杯要素识别多标签分类任务

79. Word search (medium string array matrix backtracking)

Ngrok intranet penetration

软考网络工程师

Jmeter 安装第三方插件 Plugins Manager

hcip实验(12)

Basic introduction of Rockwell AB PLC rslogix digital quantity IO module
随机推荐
CDN working principle
Less than a year after its establishment! MIT derivative quantum computing company completed financing of US $9million
internet的基本服务中文件传输命令是哪个
HCIP(11)
elment-plus图标input上面带的图标为什么不显示
LeetCode刷题系列之-多数之和类型
Form validation and cascading drop-down lists (multiple implementations)
2021 mathematical modeling group B code
32. Longest valid bracket (difficult stack string)
静态成员static详解
JS array merging, de duplication, dimensionality reduction (es6: extended operator, set)
lotus 1.16.0 延长扇区过期时间
Static details of static members
Openresty request authentication
【CVPR 2021】Cylinder3D:用于LiDAR点云分割的圆柱体非对称3D卷积网络
SQL注入 Less42(POST型堆叠注入)
阿里云CDN实践
JS implementation generates a random key of specified length
HCIP(15)
Can the MySQL create statement be used to create a table structure and append new records