Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-09-2005, 04:33 PM
|
#1
|
Member
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203
Rep:
|
Port fowarding through ssh without setting up the router, possible?
Hey all,
I was wondering if there was anyway to ssh to a remote computer on a lan without setting up the router. Is there a way to specify to ssh what local machine on the lan it should go to? If i'm not making any sense just tell me and i'll try to clarify lol.
Thanks in advance.
|
|
|
02-09-2005, 04:48 PM
|
#2
|
Senior Member
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503
Rep:
|
Do you mean changing the port ssh listens on?
|
|
|
02-09-2005, 05:00 PM
|
#3
|
Member
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203
Original Poster
Rep:
|
No, let me try to explain a bit better.
I'm connecting to my computer via ssh from my friends house (which i've done many times before) however my router is set up to forward ssh requests on port 22 to the local computer on the LAN 192.168.0.4. The problem is that my linux computer's ip address has changed to 192.168.0.8 and i have no way of remotly accessing my router to make the change needed. Is there an option that would allow me to tell ssh to forward itself to the 192.168.0.8? This would also allow me to take out the port forwarding option in my router and manually enter the number.
The reason i think there must be a way is what would happen if i had two linux machines on one LAN, how would I tell ssh which one to connect to when connecting remotely?
Something like:
ssh me@24.184.55.55 -name/ip_of_local_computer=192.168.0.8
which obviously wouldn't work but i hope it helps clarify what i'm looking for.
|
|
|
02-10-2005, 05:31 PM
|
#4
|
Member
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203
Original Poster
Rep:
|
Bumperness
|
|
|
02-10-2005, 05:39 PM
|
#5
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
And the answer is NO
ssh can't trigger anything on the router,
and from within an IP packet you can't
change the destination in the receiving
machine (or at least I hope one can't, it
would render all firewalls pretty pointless ;})
Cheers,
Tink
|
|
|
02-10-2005, 08:40 PM
|
#6
|
Member
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203
Original Poster
Rep:
|
Thanks for the answer. If I had two computers running the ssh daemon on the sam LAN at the same time and i wanted to connect to one of them remotely I'd either have to connect to the one which the router is set up to forward ssh requests to or neither of them? Well that certainly stinks lol.
Once again, thanks for the info Tink
|
|
|
02-10-2005, 08:57 PM
|
#7
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Well, you could set-up port forwarding to two DIFFERENT
ports, and tell ssh on the client to use a different port for
each machine ... ? If that's too much hassle you can still
just ssh from one client to the other once you're past the
router ...
Cheers,
Tink
Last edited by Tinkster; 02-13-2005 at 02:03 PM.
|
|
|
02-11-2005, 09:51 PM
|
#8
|
Member
Registered: Jun 2004
Distribution: Gentoo, LFS, Slackware
Posts: 203
Original Poster
Rep:
|
ohh good point, thanks again
|
|
|
All times are GMT -5. The time now is 12:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|