SSH on local and remote networks

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Moderators General, Prelates

User avatar
LucasBrown
Posts: 299
Joined: Thu Apr 15, 2010 2:57 am UTC
Location: Poway, CA

SSH on local and remote networks

Postby LucasBrown » Sun May 22, 2011 1:08 am UTC

I'm trying to set up my Ubuntu machine as a server for SSH. I've installed sshd, etc. successfully to the point that I can ssh into it from another computer on my home network, but I can't seem to ssh into it from a remote network. What do I need to twerk to make it work?

Possibly relevant data:
Home network IP: 72.x.y.z
Home network ISP: Cox Communications
SSH server's local network IP: 192.168.1.115
SSH server's OS: Ubuntu 10.04
Home network routing: Linksys

User avatar
zed0
Posts: 179
Joined: Sun Dec 17, 2006 11:00 pm UTC

Re: SSH on local and remote networks

Postby zed0 » Sun May 22, 2011 1:24 am UTC

It sounds like you need to get your router to forward port 22 to your computer.

If you don't know how to do this then guides are available for a large selection of routers at Port Forward.

User avatar
Eseell
Posts: 789
Joined: Sun Feb 21, 2010 6:58 am UTC
Location: WA

Re: SSH on local and remote networks

Postby Eseell » Sun May 22, 2011 1:27 am UTC

Beware that forwarding port 22 without any additional firewall rules is a pretty big security hole in your network, especially if you have weak passwords.
"Math is hard work and it occupies your mind -- and it doesn't hurt to learn all you can of it, no matter what rank you are; everything of any importance is founded on mathematics." - Robert A. Heinlein

User avatar
hotaru
Posts: 1045
Joined: Fri Apr 13, 2007 6:54 pm UTC

Re: SSH on local and remote networks

Postby hotaru » Mon May 23, 2011 12:55 pm UTC

Eseell wrote:Beware that forwarding port 22 without any additional firewall rules is a pretty big security hole in your network, especially if you have weak passwords.

adding firewall rules won't really help security at all unless you firewall off port 22, but that makes it impossible to use ssh. the best thing to do is to only allow public key authentication for ssh.

Code: Select all

factorial product enumFromTo 1
isPrime n 
factorial (1) `mod== 1

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Location: Madison, WI
Contact:

Re: SSH on local and remote networks

Postby EvanED » Mon May 23, 2011 3:35 pm UTC

You could always firewall off port 22 to anything but some IP addresses (ranges) of your choosing. Not leaving the US for a while? You could firewall off any non-US addresses.

How much help it'd do I dunno; probably some but not too much.

User avatar
Eseell
Posts: 789
Joined: Sun Feb 21, 2010 6:58 am UTC
Location: WA

Re: SSH on local and remote networks

Postby Eseell » Mon May 23, 2011 8:06 pm UTC

EvanED wrote:You could always firewall off port 22 to anything but some IP addresses (ranges) of your choosing. Not leaving the US for a while? You could firewall off any non-US addresses.

How much help it'd do I dunno; probably some but not too much.

This is what I was talking about. If you allow SSH, only allow it from trusted hosts, like your business or whatever. Don't just leave it wide open for anyone with a port scanner to discover and then brute-force.
"Math is hard work and it occupies your mind -- and it doesn't hurt to learn all you can of it, no matter what rank you are; everything of any importance is founded on mathematics." - Robert A. Heinlein


Return to “The Help Desk”

Who is online

Users browsing this forum: No registered users and 7 guests