SSH passwordless login(免密登陆)"/>
SSH passwordless login(免密登陆)
linux,windows 都一样。
下面以windows为例:
生成密钥对
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/user/.ssh/id_rsa): ./id_rsa_ss1
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./id_rsa_ss1.
Your public key has been saved in ./id_rsa_ss1.pub.
The key fingerprint is:
SHA256:YgEqk6O7p8iQYc8Cxxxxxxxxxxzqu0UDCRkXeTJIDs user@DESKTOP-8LB6JPN
The key's randomart image is:
+---[RSA 3072]----+
|.=.o+o |
|o.=o+.. |
...
...
|+.o o + |
|++ .o+ |
+----[SHA256]-----+
加载私钥
$ ssh-add ./id_rsa_ss1
Could not open a connection to your authentication agent.
出现上面的错误时,Could not open a connection to your authentication agent
$ ssh-agent
更多推荐
SSH passwordless login(免密登陆)
发布评论