Help with Ubuntu server remote ssh and local network ssh issues using putty.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
Help with Ubuntu server remote ssh and local network ssh issues using putty.
Hello,
I have recently installed Ubuntu Server 12.04 on my home server. There are 2 issues that I am trying to solve.
First of all, I am having trouble connecting using Putty on my Windows 7 machine on the local network. I can, however, connect locally using my laptop which has Debian 6.0.4 and it works great so I am sure that I have the ssh server up and running on the server machine. The only 3 lines that I changed in the sshd_config file were "Port xxxx", "PermitRootLogin no", and "X11Forwarding no", everything else is default.
In Putty I enter the local static IP (which I set) of the server and the port which I am now using after changing the sshd_config file. I also set the correct auto-login username for the server. When I try to connect, it gives me: "Putty Fatal Error: Network Error: Connection Refused"
Also I am having trouble connecting remotely from my laptop with Debian 6.0.4 on it. I did enable port forwarding on the correct port in my router. In Debian I try to use the command:
ssh username@xxx.xxx.xxx.xxx -p xxxx
using the public IP address of my home network and the port that I have opened up on that network. I receive the same "Connection Refused".
I am wondering if there are certain settings in the sshd_config file that I need to change? Maybe restarting the router? I am not at home and cannot connect to the server machine right now, as I said, but I was hoping for some suggestions or maybe someone has had the same issues and knows exactly how to fix it. Thank you.
soudns like the iptables firewall rules on ubuntu are configured to not allow the right port in. SSHD itself will not require any changes whatever, but as you've changed the port number (did you have a good reason??) then that needs to be opened up on the rules.
obscurity is not really security. If this is just on a LAN, change it back.
I've not used Ubuntu for a while, so someone may well correct me, but first off check that ufw is running - "sudo ufw status". try disabling it - "sudo ufw disable" and try connecting again. Presuming that does work, reenable and add port access ass per the rest of the docs - https://help.ubuntu.com/community/UFW
Last edited by acid_kewpie; 05-17-2012 at 10:32 AM.
OK, thank you for your replies. The Putty issue is just on the LAN, but I am trying to set it up so I can remote in as well from other locations. That is where I thought I would need to be a little more obscure in my port selection. I am first going to try and change the port back and see if that fixes it, because that will be a good indication if that is the issue. Then I can dig into the Ubuntu firewall stuff if I feel the need to after that.
Looking around, there are people saying that ufw isn't even running by default, so do check.
Ultimately, you can print the REAL REAL iptables rulebase running underneath ufe with "iptables -vnL" that'll give you , and us, a very clear view of what's going on at a distro agnostic level.
UFW is inactive by default. I changed the port back to 22 and at least the Putty issue is definitely resolved. I will check later tonight to see if I can remote in from another network. Thank you for your help. So there is no real advantage to changing the port that I use for my remote connections?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.