Articles of ssh keys

设置gitosis:避免重复的用户密钥

我正在按照这个指南设置gitosis 。 我在git服务器上运行所有这些,包括使用ssh-keygen -t dsa步骤为我的用户(在git服务器上)创build证书 现在, 从我想做的其他机器 git remote add origin git@GitServer:existingGitRepo.git git push origin master:refs/heads/master 但是这不断要求git @ GitServer密码! 到底是什么,后来在指南中说,从那里添加其他用户的公钥,我认为可以在另一台机器上运行ssh-keygen -t dsa并移动.pub文件 我所关心的是,我将需要为每台机器做到这一点,我将需要连接到这个git回购?

将一个ssh密钥添加到Xen虚拟机

我最近需要重新启动Xen主机箱,现在我不能再ssh进入虚拟机了。 我以前能够,但现在我获得了Permission denied (publickey). 我对Xen不太了解,有没有理由在重新启动时删除或覆盖虚拟机上的密钥? 我怎样才能把钥匙拿回机器? 我可以直接从主机箱login机器吗?

ssh-agent转发Ubuntu 10.04.03 LTS

几周前开始的一个恼人的问题,现在让我发疯了! 在家里,我有一个作为文件服务器的Ubuntu 10.04.03盒子。 我通过rsync从networking外部的其他盒子备份东西。 当我连接到这个文件服务器,从我的笔记本电脑,我转发的SSH代理: root@fileserver:~# env | grep SSH_AUTH SSH_AUTH_SOCK=/tmp/ssh-IumRLB2628/agent.2628 有这个盒子,也运行10.04.03,我不能连接。 所有其他工作正常,我的SSH密钥没有被转发probs,但这一台服务器就不会有它。 这就是我的意思: root@fileserver:~# ssh the-problematic-server -v OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009 debug1: Reading configuration data /root/.ssh/config debug1: Applying options for myserver debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to the-problematic-server [nnnn] port 22. debug1: connect to […]

没有DNS条目的SSH公钥authentication

服务器A认为它被称为foo.bar.com,但实际上有一个问题(不是在我的控制)与DNS注册,所以我连接到它在192.168.1.1。 我希望能够从那里scp使用公钥authentication服务器B. 我做了ssh-keygen,它创build了一个以“[email protected]”结尾的公钥(并将其安装在远端的authorized_keys中)。 问题:这个公钥不被接受,也许是由于反向查询的问题。 (我正在阅读这里的几行: debug1: Trying private key: /home/rmmf/.ssh/identity debug3: no such identity: /home/rmmf/.ssh/identity debug1: Offering public key: /home/rmmf/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug3: Wrote 368 bytes for a total of 1477 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password … 工作的DNS条目是用于公钥authentication的先决条件吗? 我是否需要以不同的方式进行设置? 我怎么知道这究竟是不是问题?

从同一台机器通过SSH访问远程服务器,但使用不同的IP地址

如果用户可以使用SSH访问远程机器,但是他们的静态IP地址发生变化,他们发现无法访问机器,那么问题是什么? 我不想通过生成一个新的公钥来破坏用户当前的公钥,因为那样他们将无法在其旧公钥的其他机器上进行SSH连接! 你怎么解决这个问题? 非常感谢。

如何使用公钥authentication在服务器之间build立ssh连接

我正在build立连续集成(CI)服务器和testingWeb服务器。 我想CI服务器将访问公钥authentication的Web服务器。 在Web服务器中,我创build了一个用户并生成了密钥 sudo useradd -d /var/www/user -m user sudo passwd user sudo su user ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/var/www/user/.ssh/id_rsa): Created directory '/var/www/user/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /var/www/user/.ssh/id_rsa. Your public key […]

SSH公钥authentication不能与PuTTY一起使用

我创build了一个虚拟机并安装了Redhat 6.我在使用公钥authentication方面遇到了问题。 我可以在我的Windows主机上使用PuTTY连接到redhat guest,在那里提示input密码。 我正在尝试为root用户设置公钥authentication,所以我创build了一个~/.ssh文件夹,我相信它是正确的权限。 [root@redhat ~]# cd ~/.ssh [root@redhat .ssh]# pwd /root/.ssh [root@redhat .ssh]# ls -la total 16 drwx——. 2 root root 4096 Aug 21 16:28 . dr-x——. 3 root root 4096 Aug 20 17:20 .. -rw-r–r–. 1 root root 250 Aug 20 17:20 authorized_keys -rw-r–r–. 1 root root 391 Aug 21 16:28 known_hosts […]

ssh通过隧道为了configuration自动login

我试图将id_rsa.pub密钥复制到服务器。 在我的情况下,服务器也有一个虚拟的机器,称为开发在主机上运行。 我使用此命令将id_rsa.pub密钥复制到主机以进行自动login。 ssh-copy-id -i ~/.ssh/id_rsa.pub vickey@host 这工作得很好,我可以自动login到主机。 我也想自动login到开发机器。 我知道我只能从主机中复制authorized_keys的内容到开发机器,但我正在寻找一个命令行的做事情。 创build一个隧道就像解决scheme ssh vickey@host -L 2000:dev:22 -N 现在当我尝试 ssh-copy-id -i ~/.ssh/id_rsa.pub vickey@localhost -P 2000 在这里工作的密码是我的本地机器,我希望它问我的开发机器的密码。 上面的命令将pub key添加到本地机器,而不是添加到开发机器。 但是这个命令要求我input开发密码并复制文件。 scp -P 2000 vickey@localhost:/home/vickey/trash/vim . vickey@localhost's password: vim 100% 111 0.1KB/s 00:00 我该如何做与ssh-copy-id相同?

SSH自动login为一个用户,但不是其他

我想为我的git用户启用使用.ssh / config文件的自动sshlogin。 这是我的.ssh / config文件: Host test HostName myserver.net User test IdentityFile ~/.ssh/id_rsa Host git HostName myserver.net User git IdentityFile ~/.ssh/id_rsa 它适用于我的testing用户,但不适合我的git用户,所以我的全局SSHconfiguration是正确的。 就我所知,configuration完全相同。 它曾经与git用户一起工作,但我无法改变已经打破了自动login。 当我input: ssh -v git 我得到以下日志: … debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey Offering RSA public key: /Users/mylocalusername/.ssh/id_rsa debug1: Authentications that can continue: publickey,password debug1: Next […]

没有密码的无密码scp

我正在寻找一些选项,允许我使用SCP命令接受来自任何服务器的文件。 我知道创build无密码login的过程。 但是我正在寻找的是中央服务器上的一个选项,可以将其更改为接受来自匿名用户的文件。 这可能看起来像安全隐患,但这正是我要求做的。