LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-03-2010, 05:20 AM   #16
lloowen
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 1

Ok I entered the command 'ssh -R 8080:routerip:80 user@localssh' from the vnc connection on the remote computer, replacing routerip and localssh with their respective IP's. I was prompted to enter the password and then I had to accept the new key etc...
But now I'm logged in.

Was I supposed to look for something?


Many thanks for your help by the way
 
Old 05-03-2010, 06:07 AM   #17
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
When you connect using those options, it creates a reverse proxy between your local computer and the address specified after the first colon.

ssh -R 8080:routerip:80 user@localssh

From 'localssh' if you open your webbrowser and connect to 127.0.0.1:8080, ssh will pick up that connection and forward it to 'routerip:80'

(This is so you can reconfigure the port forwarding on the router..)

Last edited by SuperJediWombat!; 05-03-2010 at 06:08 AM.
 
Old 05-04-2010, 04:32 AM   #18
lloowen
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 1
I found out what router is being used on this LAN. It's a comcast router. Here is the link to the documentation of this router. http://documentation.netgear.com/wnr...5-01/index.htm

We tried to get port22 working by deleting the portforwarding configuration for port22 and then re-creating it. It didn't work.

OK 'ssh -R 8080:router:80 user@localssh' is working and when I go to 127.0.0.1:8080 it takes me to the root directory of the web server.


I'm going through the routers documentation, but I have no idea how to resolve this problem other than what the owner and I did yesterday.
 
Old 05-04-2010, 06:33 AM   #19
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
Try forwarding a different external port to port 22 on the ssh server.
 
Old 05-05-2010, 03:18 AM   #20
lloowen
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 1
Now ssh is working on an alternative port.

Thanks every one for your help.

But what could have broken port22 and how can I fix it?
 
Old 05-05-2010, 07:37 AM   #21
SuperJediWombat!
Member
 
Registered: Apr 2009
Location: Perth, Australia
Distribution: Ubuntu/CentOS
Posts: 208

Rep: Reputation: 51
I have seen some routers not want to forward ports that they use (like a VOIP router that won't forward port 5060)

Does your router accept connections on port 22?
 
Old 05-05-2010, 11:52 AM   #22
lloowen
LQ Newbie
 
Registered: Apr 2010
Posts: 11

Original Poster
Rep: Reputation: 1
Quote:
Does your router accept connections on port 22?
How would I find that out?

Port forwarding has worked previously on port22. Also the router software does not complain when enabling port forwarding on port22.

I've noticed that since changing ssh to use another port, sftp does not work. Even if I define the new port number in the connection settings.
 
Old 05-05-2010, 08:35 PM   #23
davyherds
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 1
You reconfigure the portforwarding but it didn't work, and you changed it to another port, it worked.

I guess it means there are some other service run on your router which used port 22.
try netstat command on the router and post the result.
It would be better if you post the portfowarding rule too.

Last edited by davyherds; 05-05-2010 at 08:37 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to sftp file to remote server OzTEXS Linux - Newbie 6 06-23-2013 05:33 PM
closing SSH session without killing the SFTP transfer on the remote machine stevec Linux - Software 2 04-20-2006 05:13 PM
Restricting SFTP, SSH Remote Login majicrobot Linux - Security 1 09-20-2004 10:54 AM
ssh sftp-server dtaju Linux - Security 5 02-23-2004 04:16 PM
Problems accessing server using ssh client. rmc Linux - Networking 1 12-12-2002 02:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration