Fedora 12 on both computers
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router.
#1 192.168.1.100
#2 192.168.1.101
In the The Applications and Gaming Tab - Port Range Forward Tab , I have setup one computer as , ssh 22 22 Both 192.168.1.100 enable and it works okay.
But how do I setup computer #2 192.168.1.101 .
I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Jim wrote:
Fedora 12 on both computers
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router.
#1 192.168.1.100
#2 192.168.1.101
In the The Applications and Gaming Tab - Port Range Forward Tab , I have setup one computer as , ssh 22 22 Both 192.168.1.100 enable and it works okay.
But how do I setup computer #2 192.168.1.101 .
I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22
Short answer: You can't.
This would require you to have 2 public IP's for NAT to use.
You would need to run one on port 22 and the other on an alternate ssh port.
On Mon, Oct 4, 2010 at 7:02 PM, Jim binarynut@comcast.net wrote:
Fedora 12 on both computers
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router.
#1 192.168.1.100
#2 192.168.1.101
In the The Applications and Gaming Tab - Port Range Forward Tab , I have setup one computer as , ssh 22 22 Both 192.168.1.100 enable and it works okay.
But how do I setup computer #2 192.168.1.101 .
I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22
Short answer, you can't.
The longer answer is to translate a different port (say 2222) to port 22 on the second machine and use the command line options to use the re-assigned port when attempting to get to the second machine.
HTH
On Mon, 2010-10-04 at 19:05 -0400, Gregory Woodbury wrote:
On Mon, Oct 4, 2010 at 7:02 PM, Jim binarynut@comcast.net wrote: Fedora 12 on both computers
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router. #1 192.168.1.100 #2 192.168.1.101 In the The Applications and Gaming Tab - Port Range Forward Tab , I have setup one computer as , ssh 22 22 Both 192.168.1.100 enable and it works okay. But how do I setup computer #2 192.168.1.101 . I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22Short answer, you can't.
The longer answer is to translate a different port (say 2222) to port 22 on the second machine and use the command line options to use the re-assigned port when attempting to get to the second machine.
If gets too hard or unable to figure it out, could just ssh into one then ssh into the other from there. Of course, that won't work if one goes down.
Mike Chambers
On 5 October 2010 00:02, Jim binarynut@comcast.net wrote:
Fedora 12 on both computers
That's irrelevant. This isn't a Fedora problem, this is a basic networking problem.
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router.
I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22
You can't do this, which is why Google isn't giving you any hits. Think about it...
If you connect remotely to port 22 on the internet ip of the router, how would it know which server you were intending to connect to? Routers are very clever these days, but I haven't seen any with ESP.
You need to run SSH on a different port on one of these machines and forward that port on the router to that machine.
-- Sam
On 10/04/2010 07:08 PM, Sam Sharpe wrote:
On 5 October 2010 00:02, Jimbinarynut@comcast.net wrote:
Fedora 12 on both computers
That's irrelevant. This isn't a Fedora problem, this is a basic networking problem.
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router. I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22
You can't do this, which is why Google isn't giving you any hits. Think about it...
If you connect remotely to port 22 on the internet ip of the router, how would it know which server you were intending to connect to? Routers are very clever these days, but I haven't seen any with ESP.
You need to run SSH on a different port on one of these machines and forward that port on the router to that machine.
-- Sam
So I /assume I would have to do it this way, in router , ssh 22 2222 both 192.168.1.101 enable and go into /etc/ssh/sshd_config on 192.168.1.101 (computer #2) and set port to 2222.
To set iptable rules , how would I do that for port 2222 ? /
On 10/04/2010 07:18 PM, Jim wrote:
So I /assume I would have to do it this way, in router , ssh 22 2222 both 192.168.1.101 enable and go into /etc/ssh/sshd_config on 192.168.1.101 (computer #2) and set port to 2222.
You can leave both Fedora machines on port 22. Its the incoming router port that needs to change for the second machine i.e.
router port 22, forward to machine 1, port 22 router port 2222, forward to machine 2, port 22
Cheers, Raman
Jim writes:
Fedora 12 on both computers
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router.
#1 192.168.1.100
#2 192.168.1.101
In the The Applications and Gaming Tab - Port Range Forward Tab , I have setup one computer as , ssh 22 22 Both 192.168.1.100 enable and it works okay.
But how do I setup computer #2 192.168.1.101 .
On Computer #2 edit /etc/ssh/sshd_config, and set ListenAddress to have #2 listen on a different port.
Then forward the different port in your router in the same manner you've forwarded port 22.
Actually, it's a good idea to have both of your machines listening on some randomly-chosen non-default port for ssh connections. Keeps the script kiddies away.
On 10/04/2010 04:02 PM, Jim wrote:
Fedora 12 on both computers
I have two computers setting behind this Linksys WRT54G router and I want to connect to both of them by SSH remote across the Internet. I have the internet IP for this router.
#1 192.168.1.100
#2 192.168.1.101
In the The Applications and Gaming Tab - Port Range Forward Tab , I have setup one computer as , ssh 22 22 Both 192.168.1.100 enable and it works okay.
But how do I setup computer #2 192.168.1.101 .
I have Googled the Internet and found out how to setup one on port 22 , but not Two computers using SSH port 22
Must you have both to use port 22 for ssh? How about configuring one of the (in /etc/ssh/sshd_config) to use port 2222 and configure thr router to forward port 2222 to it and the other can use port 22. So when you ssh to these from the internet, you ssh to the pulblic IP address of the router and add the port to the command line argument. as in ssh -X host -p portNumber