LinuxQuestions.org
Review your favorite Linux distribution.
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 12-15-2002, 04:43 PM   #1
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
LinkSys Forwarding?


Hi

I run Red Hat 7.3 box. I use LinkSys DSL router MODEL: BEFSR41.
So I want to enable the ssh connection to the box using port 22.

In order to do that, I need to make changes to the FORWARDING option in LinkSYS

So I did:

#1 htp://192.168.1.1 // login
#2 click Advance
#3 click Forwarding
#4 Enter Port 22 on Service Port Range, looks Like
Service Port Rande 0 ~ 22 IP Address 192.168.1.1
#5 Click APPLY

However, when I try connect remotely to the box it can't connect..
I typed the command to connect: ssh -l my_Ip_address

It doesn't work ..

Can someone give me a hint on that?

Thanks

M.S.
 
Old 12-15-2002, 04:58 PM   #2
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
You're not indicating that you forwarded ports 0 through 22 are you? That won't keep SSH from working but it's more ports than you need, you can do just 22 - 22. On newer Linksys firmware make sure there is a checkmark in the "enable" box at the right. Also make sure you've chosen protocol TCP, not UDP. Last but not least, a -l parameter specifies what username to ssh as in case it's different than what you're logged in as now.

Firewall rule blocking you? Try "ipchains -L" and "iptables -L" to list current rules.

Good luck!
 
Old 12-15-2002, 05:14 PM   #3
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by wdingus
You're not indicating that you forwarded ports 0 through 22 are you? That won't keep SSH from working but it's more ports than you need, you can do just 22 - 22. On newer Linksys firmware make sure there is a checkmark in the "enable" box at the right. Also make sure you've chosen protocol TCP, not UDP. Last but not least, a -l parameter specifies what username to ssh as in case it's different than what you're logged in as now.

Firewall rule blocking you? Try "ipchains -L" and "iptables -L" to list current rules.

Good luck!
I don't have firewall ..
So in order to connect remotely to the server I need to do the following:

ssh -l username remote_IP_number
Correct?

Thanks
 
Old 12-15-2002, 05:29 PM   #4
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Yes.. or just "ssh ip_number" if the user you're currently logged in as is the one you want to log in remotely with.
 
Old 12-15-2002, 05:37 PM   #5
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by wdingus
Yes.. or just "ssh ip_number" if the user you're currently logged in as is the one you want to log in remotely with.
Thanks wdingus

Another question:

If I run the box and currently login as username: mike .. Can someone remotely login to the box with the same username?

Thanks a lot

M.S.
 
Old 12-15-2002, 07:17 PM   #6
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
Not sure I understand.. If someone else knows the password for that account, sure they can login. If you forward the port int he Linksys then anyone can connect to it. The thing to do is to keep the password secure and keep the version of SSH up to date (security patches, etc...).
 
Old 12-15-2002, 07:54 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by mikeshn
I don't have firewall ..
So in order to connect remotely to the server I need to do the following:

ssh -l username remote_IP_number
Correct?

Thanks
Most likely this didn't work for you cause you would want to put that in this format:

ssh username@host_or_ipnumber

When you made a space between the username and remote IP number, ssh thought most likely it was trying to connect to your username like if it was a host computer.
 
Old 12-15-2002, 09:06 PM   #8
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
OpenSSH will take either "-l user hostname" or "user@hostname" as correct syntax.
 
Old 12-16-2002, 08:22 AM   #9
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Rep: Reputation: 30
mikeshn, your forwarding that to 192.168.1.1, which is the router's default IP. You have to forward it to the IP of the computer on your network that you want SSH to connect to.
 
  


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
Some difficulty configuring port-forwarding through Linksys router eventide Linux - Networking 9 03-03-2005 01:04 PM
linksys port forwarding problem patrickclay Linux - Networking 5 08-29-2004 02:46 PM
Forwarding port 80 to two hosts from a Linksys router ridertech Linux - Networking 1 08-19-2004 12:56 PM
Linksys router- forwarding ports glore Linux - Networking 1 06-01-2004 11:00 PM
Port forwarding in Linksys Box (cable/dsl) pudhiyavan Linux - Networking 1 01-22-2004 09:37 AM

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

All times are GMT -5. The time now is 10:44 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