How to know if a site accepts ssh connections or not

3

This site purportedly accepts ssh connections:

tigershark.engr.sjsu.edu

When I try to ssh into it, I don't get any response. However it responds to pings. How can I tell if this site accepts ssh connections, or what kinds of connections it accepts?

tony_sid

Posted 2010-09-13T06:25:17.053

Reputation: 11 651

are you using key based authentication – subanki – 2010-09-13T06:39:15.477

I don't think so. How can I find out? – tony_sid – 2010-09-13T06:43:39.210

In .ssh/authorized_keys file remove all break-lines and see if that connects . Do one thing go and check this http://serverfault.com/questions/24199/ssh-connection-reset-by-peer

– subanki – 2010-09-13T06:45:41.093

Answers

2

By definition, if the site doesn't respond when you ssh into it, it doesn't accept ssh connections from you. But that could be due to a temporary failure or a problem at your end.

Try running ssh -vvv tigershark.engr.sjsu.edu to see where the process hangs.

If it responds to pings, it means that there is a machine with that IP address that is presently connected to the Internet and that responds to pings. The machine may however not be running an ssh server, or your login attempt may be blocked by a firewall. The firewall could be anywhere from your machine (unlikely), through your network (some sites block outgoing ssh connections), to the target network. If you can ssh to tigershark.engr.sjsu.edu from within SJSU but not from outside, that's the likely explanation. Maybe there's another machine you're supposed to connect through when you're off-campus; ask the system administrators.

The command tcptraceroute tigershark.engr.sjsu.edu 22 will try to send packets to the target port and report how far the packets went. You may need to install it via your OS's package management system or from the tcptraceroute website.

A very powerful tool to see what services are available on a network is nmap. Beware that depending on what options you use and who you ask, the level of intrusiveness may range from phoning a store to ask the opening hours to checking if the backyard-facing window can be open from the outside by inserting a knife blade just there and twisting just so.

Gilles 'SO- stop being evil'

Posted 2010-09-13T06:25:17.053

Reputation: 58 319

1

you can telnet to 22 port and watch the answer
for example:
telnet localhost 22

Trying ::1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.3p1 Debian-3ubuntu4

so if connection isn't refusing and you see answer of ssh server - it accepts ssh connections

zaynyatyi

Posted 2010-09-13T06:25:17.053

Reputation: 509

I tried to telnet that address and didn't get any kind of response. – tony_sid – 2010-09-13T06:56:21.490

1

If the host didn't accept ssh connections, your ssh would normally exit in a few seconds with a "Connection refused" error message.

You can see what your ssh client thinks is going on by adding the -v option to your ssh command. You can repeat the -v option up to three times to get more verbose output.

garyjohn

Posted 2010-09-13T06:25:17.053

Reputation: 29 085