problem description
I am trying to use nginx with hexo to build blog, and then complete the basic configuration. I hope to be able to write it locally and then push it to the git repository on vps.
reference tutorial: https://www.jianshu.com/p/b92...
my git cannot connect to vps using ssh. What are the following possible reasons? my case is as follows:
1. My vps is blocked by tcp, so ssh is through another vps"s ssr agent. Before setting up the proxy (that is, the local / ssh/config file is not yet available), prompt Connection timed out (case 1);
2. After setting up the ssh proxy (127.0.0.1 locally), prompt / usr/bin/bash: line 0: exec: nc: not found
ssh_exchange_identification: Connection closed by remote host
(case 2); check: there is no / usr/bin/bash directory on the vps.
config file for 3.ssh (case 3)
user git has been created on vps
related codes
- case 1
$ssh git@ip-p port
ssh: connect to host port : Connection timed out - case 2
$ssh git@ip-p port
/ usr/bin/bash: line 0: exec: nc: not found
ssh_exchange_identification: Connection closed by remote host - case 3:
Host ip
User git
Hostname ip
Port port
ProxyCommand nc-v-x 127.0.0.1 ProxyCommand nc 1080% h p
try later
now I have changed the port of vps to 22, so there is no need to specify a port when ssh, but still prompt:
/ usr/bin/bash: line 0: exec: nc: not found
ssh_exchange_identification: Connection closed by remote host