I have since last week-end the following problem on my laptop (at home).
- At login, my system opens an ssh tunnel between my work an my home, using the following command written in my .bash_profile:
ssh -N -i *some-key* *my-login-name@my-work* -L2222:*a-computer-at-work*:22 2> /dev/null &
- I then used to connect to my work through this tunnel using the following command:
ssh -t -p 2222 localhost
This doesn't work anymore, and the second command gives me:
ssh: connect to host localhost port 2222: Connection refused
I have commented the above 'ssh -N...' command in my .bash_profile and restarted. I then noticed that sshd.service was no longer running: even 'ssh localhost' answered 'Connection refused'. Thus I re-enabled sshd.service using systemctl, restarted and 'ssh localhost' works fine again, but still not the above 'ssh -t...' command (wether or not I run first the above 'ssh -N...' command!).
I feel very uncomfortable on questions concerning network, and I have absolutely no idea of what is going on here. I haven't moved to netctl yet, but a priori it shouldn't have to do with my problem since I do connect myself to the internet without problem (I can post on this forum...). At first I would like to know if the problem comes from the first command (the tunnel does not open for some unknown reason) or the second one. How could I test it?
Last edited by LuX (2013-05-07 07:43:32)
Is that computer at work behind a firewall?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence. You must not work with the public much. -- Trilby
How to Ask Questions the Smart Way
The problem was only that my IP address had been blacklisted. Sorry for this pointless post, and thank you for the answers.
It is strange that sshd.services was disabled, though. Maybe only sshd.socket used to be enabled previously. Anyhow, everything is working fine now, so...
Last edited by LuX (2013-05-07 07:46:40)