URI 在链接内保存密码
有没有办法将 ssh 连接的密码保存在 uri 链接内。 AFAIK uri 可以如下所示:用户名:密码@域/路径。但以下示例在 ubuntu 上不起作用:
ssh user:pass@domain/path
我总是收到“请输入密码”的问题。我知道在链接内以纯文本形式保存密码并不是一种非常安全的方法,但我必须与其他开发人员合作,我该怎么说......他们是前 Windows 用户,他们不喜欢终端因此我想写一个小的 shell 脚本。这个脚本应该克隆一个远程 git 存储库并创建一些特定的东西。
单击一下,我应该施展一些魔法!
Is there a way to save the password of a ssh-connection inside an uri-link. AFAIK a uri can look like this username:password@domain/path. But the following example doesn't work on ubuntu:
ssh user:pass@domain/path
I always receive a "please enter password"-question. I know that it is not a quite secure way to save the password in plain text inside a link, but I have to work with other developers and what should I say... they are ex-Windows user, they don't like terminals and therefore I want to write a tiny shell script. this script should clone a remote git repo and create some specific stuff.
One click and I should do some magic!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该使用通过 ssh-keygen (man ssh-keygen) 生成的 ssh 密钥。这在 Windows 平台的 putty 环境中也可用。
在您可以在远程主机中使用 ssh 密钥之前,您必须将公钥插入到authorized_keys 文件中。一种方便的方法是使用命令
,或者,如果密钥已由 ssh-agent 加载
,此后,您不需要任何密码即可与已建立的远程主机进行 ssh 连接。您应该为每个用户使用不同的 ssh 密钥,这样您就可以启用和禁用密钥,而不会打扰其他用户。
You should use a ssh-key generated with ssh-keygen (man ssh-keygen). This is also available on the windows platform within the putty environment.
Befor you can use your ssh-key in the remotehost, you must insert the public key to the authorized_keys file. A convenient way is the command
or, if the key is already loaded by the ssh-agent
After this point, you dont need any password for ssh connection to established remote hosts. You should use per user a different ssh-key, so you are able to enable and disable keys without bothering the other users.
您无法使用 ssh 输入密码登录。
另一种替代方法是设置一对 ssh 密钥,并使用 ssh 密钥登录。
我遵循此处的指南: http://www.softwareprojects.com/resources/programming/t-ssh-no-password-without-any-private-keys-its-magi-1880.html
You can't login with input password using ssh.
Another alternate way is setup a pair of ssh-keys, and login using ssh-key.
I follow the guide here: http://www.softwareprojects.com/resources/programming/t-ssh-no-password-without-any-private-keys-its-magi-1880.html