从命令行没有密码的 svn + ssh? [英] svn + ssh without password from command line?

查看:31
本文介绍了从命令行没有密码的 svn + ssh?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做

svn update /Users/radek/Sites/3.0.5/ -r HEAD --force

无需输入密码.

svn 连接到我们的存储库服务器,但我不确定使用什么用户名(我怎么知道?).我猜它要么是 root 要么是 radek

svn connects to our repository server but I am not sure under what username (how can I find out?). I guess it would be either root or radek

我为 svn 输入的密码与存储库服务器上 root 的密码相同,所以我将我的公钥添加到 root 的 authorized_keys 文件中.所以我没有输入密码就 ssh 到存储库服务器,但这根本不影响 svn 要求输入密码.存储库服务器上用户radek的密码与我为svn up

The password I type for svn to proceed is the same like root's one on repository server so I added my public key to root's authorized_keys file. So I ssh to repository server without typing password but it did not affect svn asking for password at all. The password of user radek on repository server is different to the one I type for svn up

如果我从 Eclipse 提交一些东西,作者就是 radek.

If I commit something form Eclipse the author is radek.

svn info

告诉我必须登录到存储库服务器的用户,然后我将公钥添加到其authorized_keys 文件中.现在用svn不用输入pass了.

told as which user I have to log in into repository server and then I added public key to its authorized_keys file. Now I do not have to enter pass when using svn.

推荐答案

有一个名为ssh-agent"的程序,它将在内存中保存一个未锁定的 RSA 或 DSA 密钥,并通过 UNIX 套接字将此密钥提供给 SSH.这可用于无密码"SSH 连接,假设您生成了 RSA 或 DSA 公钥/私钥对,并将公钥添加到远程主机的authorized_keys"或authorized_keys2"文件中.当您第一次向 ssh-agent 添加密钥或打开 ssh-agent 时,您需要提供密码,但后续使用 SSH 时无需密码.您可能会发现以下文章对设置 SSH 代理很有帮助:

There is a program called "ssh-agent" that will save an unlocked RSA or DSA key in memory and supply this key to SSH through a UNIX socket. This can be used for "password-less" SSH connections, assuming you generate an RSA or DSA public/private key pair, and add the public key to the "authorized_keys" or "authorized_keys2" file of the remote host. When you first add a key to ssh-agent or turn on ssh-agent, you will need to supply your password, but subsequent uses of SSH can occur without a password. You may find the following articles helpful in terms of setting up SSH agent:

请注意,在 Mac OS X(10.5 及更高版本)上,如果您生成私钥/公钥对并将公钥放在远程主机的 authorized_keys 文件中,当您通过 SSH 连接到该主机时,Mac OS X将自动启动自己的 ssh 代理(无需设置)并提供记住密码(它将保存在 KeyChain 中).您可以在 Mac OS X Leopard -- 内置 SSH 代理.

Note that on Mac OS X (as of 10.5 and higher), if you generate the private/public key pair and put the public key in the authorized_keys file of the remote host, when you SSH into that host, Mac OS X will automatically start up its own ssh-agent (no setup required) and offer to remember the password (it will save it in KeyChain). You can read more about that on Mac OS X Leopard -- Built-In SSH Agent.

这篇关于从命令行没有密码的 svn + ssh?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆