简体   繁体   English

Linux:SSH / SCP甚至在无密钥连接中也要求提供id_dsa密码

[英]Linux: SSH/SCP Ask for id_dsa passphrase even in key-less connections

I have a public/private key pair for ssh connections to a server S, but now, even if do a ssh to another device that does't need any key authentication, I always have the message: 我有一个用于连接到服务器S的ssh的公共/专用密钥对,但是现在,即使对不需要任何密钥身份验证的另一台设备执行ssh认证,我也总是收到以下消息:

> ssh user@192.168.0.10
Enter passphrase for key '/home/user/.ssh/id_dsa': 
user@192.168.0.10's password:

Usually I hit enter in the first question (leaving it blank) and I type the user's password in the second question. 通常,我在第一个问题中按Enter(将其留空),然后在第二个问题中键入用户的密码。

But as I want to write some scripts to automatize some things, the "Enter passphrase for key '/home/user/.ssh/id_dsa': " message bothers me. 但是,由于我想编写一些脚本来使某些事情自动化,所以“输入密钥'/home/user/.ssh/id_dsa':“的消息使我感到困扰。

Why it appears for every connection request? 为什么它出现在每个连接请求中? Can I do something so it won't ask me that for every connection? 我可以做些什么,以免每次连接都问我吗? Just with the server S? 只是与服务器S?

Thanks 谢谢

Assuming you're using Linux ssh-agent to store your keys so you don't have to keep typing it. 假设您正在使用Linux ssh-agent存储密钥,那么您就不必继续键入它。

Using ssh-agent to manage your keys 使用ssh-agent管理密钥

Based on this ServerFault answer : 基于此ServerFault答案

ssh -o PubkeyAuthentication=no host.example.org

To avoid typing it every single time, you can add something like this to ~/.ssh/config 为了避免每次都键入,可以在~/.ssh/config添加类似的内容

Host host.example.org
PubkeyAuthentication no

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM