LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-19-2007, 11:22 PM   #1
Registered: Sep 2004
Posts: 48

Rep: Reputation: 15
Setting up ssh for ubuntu behind a router

I'm trying to make it so i can get files off my linux machine remotely from a windows machine. I'm using putty on my windows machine, but can't get it to connect to my linux machine. My linux machine is behind a router so I have my router forwarding a random port for ssh to use. When I use putty I go under the tunnel options and pick that port, say 34234 or whatever. I type that as source port and then type in localhost:34234 as destination and add that (where localhost is my ip address). Is ssh running by default in ubuntu, or is there something else I need to do to connect? Seems easy enough but it's not working.
Old 07-20-2007, 12:35 AM   #2
Registered: Nov 2003
Distribution: Debian
Posts: 117

Rep: Reputation: 18
I've never used Putty so I can't comment on it, but the ssh server is not generally installed on Ubuntu. To check to see if it's installed, do:

ps ax | grep ssh

You should see something like this, if ssh is running:

4692 ? Ss 0:00 /usr/sbin/sshd

If you don't, install it via apt-get.

sudo apt-get install ssh

Default port is 22. If you want to change that, you'll need to edit the following file:


Then you'll need to restart your sshd server:

sudo /etc/init.d/ssh restart

Here's a nice tutorial on ssh tunneling for Putty:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 04:15 PM
Setting up Ubuntu (for an ubuntu-newbie) winterhunter Ubuntu 2 02-27-2007 03:14 PM
Port fowarding through ssh without setting up the router, possible? Baix Linux - Newbie 7 02-11-2005 10:51 PM
Got new router, can't ssh in now Chuk Linux - Networking 2 10-16-2004 02:52 AM
ssh behind a router The sakkie Linux - Networking 16 07-12-2003 05:48 AM

All times are GMT -5. The time now is 09:46 AM.

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