github push 出现connection refused 的处理办法
2014-10-28 12:05
148 查看
针对公网上的服务器的检查,在日志中会发现大量针对22端口(ssh)的非法扫描。为了增强安全性,减少这些扫描,我们将服务器的ssh端口改成了一个非标准的端口。
这时,连接github时,会出现错误,无法连接:
#git pull
ssh: connect to host github.com port xxxxx: Connection refused
fatal: The remote end hung up unexpectedly
解决方法,编辑一个 ssh 的config文件:
测试一下:
这时,连接github时,会出现错误,无法连接:
#git pull
ssh: connect to host github.com port xxxxx: Connection refused
fatal: The remote end hung up unexpectedly
解决方法,编辑一个 ssh 的config文件:
$vim ~/.ssh/config Host github.com HostName github.com Port 22
测试一下:
$ssh -T git@github.com Hi pubyun! You've successfully authenticated, but GitHub does not provide shell access. $git pull Current branch master is up to date.
相关文章推荐
- ssh连接树莓派出现"network error:connection refused"的解决办法
- ssh连接树莓派出现"network error:connection refused"的解决办法
- SSH连接GitHub出现 ssh: connect to host github.com port 22: Connection refused解决方法
- Linux下停Tomcat服务器,出现Connection refused错误解决办法
- Mac OS下使用SourceTree Push到Github时出现 POST git-receive-pack (chunked) 的解决办法
- Linux 出现telnet: 127.0.0.1: Connection refused错误解决办法
- JDBC连接SQL Server出现的connection refused问题的解决办法
- 某企业SQUID透明代理上网时出现如下问题,正在想处理办法?
- Visual Studio引用COM时出现警告的处理办法
- Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误解决办法
- JDBC连接SqlServer2000出现"Connection refused: connect"的解决方案
- VS中使用VC资源编辑器添加变量或事件处理程序出现脚本错误的解决办法
- 在vs2005中出现: error LNK2001: 无法解析的外部符号 __security_cookie现象的处理办法
- 远程服务器连接出现"服务器连接数过多"时处理办法
- Sys.WebForms.PageRequestManagerServerErrorException: 在服务器上处理请求时出现未知错误解决办法
- 出现禁行标志、“五国”和自动重启的处理办法
- [转] 使用 pq magic 分区出现 Error 983 报错信息的处理办法
- ActiveReport中的Chart控件,用于web的pdf导出时的中文不出现处理办法
- nsf数据库出现一致性检查的处理办法
- 把一个用sql server 2005内置加密方法加密数据的DB从一台电脑备份后,还原到另外一台电脑上,出现的问题的处理办法