0

I have a workstation and I need to connect to a remote server via ssh. Server is under Solaris 11. I can connect to remote server, but when I try to ssh back from remote server to my workstation, I get timeout error.

How is it possible that I can connect to remote host but I can't connect back?

PS: Firewall on my workstation is disabled.

sluge
  • 119
  • 3
  • what do you mean when saying `connect back`? Do you want creat SSH connection from your server to workstation? – cuonglm May 30 '13 at 07:32
  • By the way, sluge, local etiquette is that when you're happy with an answer to one of your questions, you accept it by clicking on the tick outline thereby. This drives the reputation system both for you and the author of the answer. I notice that you've not accepted an answer to any of the questions you've asked on SF, some of which have answers that you've indicated you're happy with, so you might want to visit your old questions, as well. – MadHatter May 30 '13 at 11:27

2 Answers2

3

The fact that you can connect from machine A to machine B on port 22 doesn't imply that you'll be able to connect from B to A on port 22. After all, my desktop can connect to google.com on port 80, but it definitely doesn't imply that the entire global array of google servers can connect to my desktop's apache instance.

Many things can get in the way: NAT, your site firewall, their site firewall, some firewall in between, to name but a few.

What you can do is use ssh to make a reverse tunnel back from the Sol 11 box to your desktop. You would do this by connection with

desktop% ssh solaris-11-server -R 2222:localhost:22

Then, when you're on the Sol11 box, and want to ssh to your home system, you connect to the Sol 11 box on port 2222 (which is just a random number, change it in the above and below commands if you need to), with

sol11% ssh localhost -p 2222
MadHatter
  • 79,770
  • 20
  • 184
  • 232
0

(this is a totally speculative answer, given you haven't provided details of which OS your desktop is, and whether your server is on the LAN...)

Possibly because your workstation is using a NAT ip address provided by your router.

if you type

ipconfig

and look for the IPv4 address, if it begins with 10.0.. or 192.168. then you are hidden from the internet by "private addresses" using NAT (network address translation)

here is an example of a NAT'ed client, (and hence would be enable to connect back, directly from the server, (except with a work around that MadHatter has provided))

enter image description here

see here for more information on private addressing rfc 1918 - https://en.wikipedia.org/wiki/Private_network

and here for a brief tutorial on how to check whether your windows desktop is NAT'ed; http://www.youtube.com/watch?v=49tYGwBhP3Y

Tom
  • 11,176
  • 5
  • 41
  • 63