连接拒绝与织物,但不是腻子

在这里输入图像说明

我正在使用git-bash在win10本地工作。 我有兴趣在我正在开发的ubuntu 16.4 vps上设置一些基本的安全性。 我通过https://www.codelitt.com/blog/my-first-10-minutes-on-a-server-primer-for-securing-ubuntu/和http://plusbryan.com/my-第一个5分钟的服务器或基本安全的Linux服务器 。

基于这个我做到了:

vim /etc/default/ufw 

然后:

 IPV6=yes sudo ufw allow OpenSSH sudo ufw allow 80 sudo ufw allow 443 

然后我重置它。

我有一个python结构脚本,我已经成功地使用此服务器之前进行安全更改:

 @roles('production') def dir(): # env.key_filename = '~/.ssh/id_rsa' # env.key_filename = 'E:\.ssh\id_rsa.pem.ppk' env.key_filename = 'E:\.ssh\id_rsa_private' local("pip freeze > requirements.txt") local("git add . --all && git commit -m 'fab'") local("git push myproject master") run('pwd') run('ls') code_dir = '/home/deploy/myproject/' with cd(code_dir): run('pwd') run('git reset --hard master') run('ls -la') 

现在,当我运行它时,我得到:

 debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 22. debug1: connect to address xx.xx.xx.xx port 22: Connection refused ssh: connect to host xx.xx.xx.xx port 22: Bad file number fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Fatal error: local() encountered an error (return code 128) while executing 'git push mysite master' 

我打开了Windows 10的远程login客户端,并运行“telnet xxx.xx.xx.xx 22”得到:

 Could not open connection to the host, on port 22: Connect failed 

但我相信端口22是开放的,因为我可以用腻子login。

我已经检查,并在我的VPS我的/ home / deploy / .ssh / authorized_keys包含我的id_rsa公钥。 我已经尝试了结构脚本上的各种版本的私钥,因为我怀疑这是一个关键的相关问题。

一个问题是,我现在有一个密码短语,但面料不停顿要求这一点。

我怎样才能得到这个工作?