I need someone help over the ssh connection issue,
I could ssh out to other computer from computer A but unabled to ssh back the computer A, I got a messages says
the port 22 connection fail.
Sometimes the ssh debug mode can give you more information on what the problem might be ...
But use this with caution because if ssh is your only access to the system you might lock yourself out if something goes wrong ! So you should at least open up telnet access during that time and make sure you can logon via telnet ...
However in order to switch to the debug mode you'll have to stop the ssh subsystem (e.g. stopsrc -s sshd) and then start ssh like this:
/usr/local/bin/sshd -d -D
(or whatever path you are using)
This will give you a detailed output on your console. Then try to connect and see what happens. After that use <CTRL>+<C> to quit the sshd and restart your subsystem using startsrc -s sshd (or whatever it is called on your machine).
Thanks for the responding, I just came back from vacation and I'm very glade to see the help I got from you guys.
I disabled the Iptables and run the /usr/local/sshd -D -d
got messages below
debug1 sshd version Openssh.3.1p1
debug1 read PEM private key done: type RSA
debug1 pivate host key: #0 type 1 RSA
debug1 read PEM private key done: type DSA
degug1 private host key: #1 type 2 DSA
sockey: Address family not responding by protocal
debug1 Bind to port 22 on 0.0.0.0
server listening on 0.0.0.0 port 22
and my computer was hanging after above messages.
Its running Linux 7.3.
It's not hanging at all. It's running!
When you run ssh with the -D option it doesn't become a resident program. (e.g. Daemon)
TSch stated that option, so that you can view what the program is doing in a seperate session.
Just do a "/etc/init.d/sshd start"
Make sure you have another user besides root on your system
to log on with.
Make sure no rules are blocking communications like sillyVM said. With "/sbin/iptables -L" you can check whether you accept all communication (BAD Idea) or whether you are blocking ssh connections (inbound port 22 tcp)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.