ubuntu git ssh不通

xyh@ubuntu-64:~$ ssh -v git@danxinben.com                                                                            
OpenSSH_5.9p1 Debian-5ubuntu1.7, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/xyh/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to danxinben.com [10.1.10.202] port 22.
debug1: connect to address 10.1.10.202 port 22: Connection refused
ssh: connect to host danxinben.com port 22: Connection refused

 

解决办法:vim .ssh/config

Host git.danxinben.com
User xuyonghong
Hostname git.danxinben.com
PreferredAuthentications publickey
IdentityFIle ~/.ssh/id_rsa
port 10022

posted @ 2015-10-12 12:42  夕相待  阅读(497)  评论(0编辑  收藏  举报