You are not logged in.

#1 2008-09-19 19:11:36

ravster
Member
From: Queen's U, Kingston, Canada
Registered: 2004-05-02
Posts: 285
Website

Reverse ssh not working

I'm trying to reverse ssh into my home computer (Arch) and I'm using Arch on the computer I'm working on.
The other person, from my home computer types in

ssh -R 5000:localhost:5000 p@MYIP

Then I (as user 'ravi') type in

ssh -p 5000 root@localhost

But I keep getting an ssh_exchange_identification error about the connection being refused. This is the same even if I replace 'root' with other users on my home computer.

Help, please? I'd appreciate any direction that someone can give. Both the computers are behind routers, and my router forwards port 22 to my computer, but this hasn't been set up on the home computer.

Offline

#2 2008-09-19 19:15:06

pjjanak
Member
Registered: 2008-08-17
Posts: 128

Re: Reverse ssh not working

You might be having the same problem as me. Try just doing a regular ssh into your localhost and see if you can get in. If not, please continue this discussion in this thread: http://bbs.archlinux.org/viewtopic.php? … 29#p422429

Offline

#3 2008-09-19 21:23:42

ravster
Member
From: Queen's U, Kingston, Canada
Registered: 2004-05-02
Posts: 285
Website

Re: Reverse ssh not working

K, I'll continue in your post. I read that earlier, but didn't want to hijack your thread

Offline

#4 2008-09-20 06:43:52

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Reverse ssh not working

I'm fairly sure I figured it out, see the other thread.


1000

Offline

#5 2008-09-21 18:44:11

TheAmigo
Member
Registered: 2008-04-08
Posts: 68

Re: Reverse ssh not working

Does your home computer have sshd running on port 5000?  If not, then it would seem like you'd want to use:

ssh -R 5000:localhost:22 p@MYIP

to setup the reverse tunnel, then login as you were trying before:

ssh -p 5000 root@localhost

--
The Amigo

Offline

#6 2008-09-21 19:02:49

ravster
Member
From: Queen's U, Kingston, Canada
Registered: 2004-05-02
Posts: 285
Website

Re: Reverse ssh not working

Yeah, I tried that too. It didn't work.
Logging directly into the home computer worked after the sshd was restarted, so I should try this again.
Thanks

Offline

#7 2008-09-22 09:39:06

SlodS
Member
Registered: 2007-03-21
Posts: 20

Re: Reverse ssh not working

Have you checked /etc/hosts.allow and allowed localhost connecting to local sshd daemon?
If not, you should add there a line, something like:

sshd: 127.0.0.1

This should make local SSHing work.
Look at /etc/hosts.allow documentation, if you want more advanced access control.

Good Luck

Offline

#8 2008-09-22 13:09:30

ravster
Member
From: Queen's U, Kingston, Canada
Registered: 2004-05-02
Posts: 285
Website

Re: Reverse ssh not working

I have 'sshd: ALL' in both my computers. When I type in 'ssh p@localhost' (regular, not reverse ssh), I am able to login to the 'p' account without any difficulties.
I read somewhere that I should try the '-f -N' set of flags. I've read the man page and don't see how that would help, but I'll give it a shot when trying reverse ssh again.
I am also able to log into my computer from multiple sources over the internet.
thanks.

Offline

Board footer

Powered by FluxBB