这是我使用的程序:
$ cd .ssh
bash: cd: .ssh: No such file or directory
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
- ENTER -
Enter passphrase (empty for no passphrase):
- ENTER -
Enter same passphrase again:
- ENTER -
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256: "hugecode" user@user
The key's randomart image is:
"lots of characters"
$ cd .ssh
$ sudo nano config
Host user IP addr
HostName IP addr
User user
PreferredAuthentications publickey
IdentfyFile /home/user/.ssh/id_rsa
Host server IP
HostName IP
User server
Port no.of port
- Close config -
$ ssh server
/home/user/.ssh/config: line 5: Bad configuration option: identfyfile
/home/user/.ssh/config: terminating, 1 bad configuration options
我需要一个解决方案。
答案1
您拼错了“身份”我ty文件:
/home/user/.ssh/config:第 5 行:错误的配置选项:identfyfile