Linux环境:Debian 9.1,带有Gnome桌面
我同时拥有ECDSA和ED25519身份,但是从命令行,ssh-add命令会出错:
无法添加身份
怎么解决?
根据:
https://bugzilla.gnome.org/show_bug.cgi?id=641082#c22
该错误与使用ECDSA密钥的gnome-keyring支持有关.
对我有用的修复方法是:
mkdir -p ~/.config/autostart
cp /etc/xdg/autostart/gnome-keyring-ssh.desktop ~/.config/autostart/
echo "X-GNOME-Autostart-enabled=false" >> ~/.config/autostart/gnome-
keyring-ssh.desktop
Run Code Online (Sandbox Code Playgroud)
重新启动后,ssh-add可以从命令行正常工作:
marco@cluster:~$ ssh-add
Enter passphrase for /home/marco/.ssh/id_rsa:
Identity added: /home/marco/.ssh/id_ecdsa (/home/marco/.ssh/id_ecdsa)
Identity added: /home/marco/.ssh/id_ed25519 (marco@cluster)
Run Code Online (Sandbox Code Playgroud)