git-ssh-server icon indicating copy to clipboard operation
git-ssh-server copied to clipboard

Unable to connect to ssh server

Open phuongnd08 opened this issue 10 years ago • 2 comments

Following the Readme instruction, I'm unable to connect to the git server:

Within the server:

$ telnet 127.0.0.1 2222
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Netstat

$ netstat -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN
tcp6       0      0 :::2222                 :::*                    LISTEN

(Weird that only tcp6 is listed for 2222)

Connect from outside the host

$ telnet XXX.XXX.XXX.XXX 2222
Trying XXX.XXX.XXX.XXX...
telnet: connect to address XXX.XXX.XXX.XXX: Connection refused
telnet: Unable to connect to remote host

phuongnd08 avatar Jun 28 '15 16:06 phuongnd08

The issue is that the sshd service is configured down:

✗ docker run -it --rm unixtastic/git-ssh-server ls -l /etc/service/sshd                                                                ruby-2.2.2 (master) ddd089c ✶
total 4
-rw-r--r-- 1 root root  0 Jul 15 19:13 down
-rwxr-xr-x 1 root root 40 Jul 15 19:13 run

file /etc/service/sshd/down needs to be removed for it to work

vitaly avatar Dec 02 '15 14:12 vitaly

This should be fixed now. If someone can confirm I'll close this issue.

Sorry for the delay. This is the first time I've checked this repo for a while.

unixtastic avatar May 29 '16 14:05 unixtastic