External SSH/PuTTY Connection - Failure!

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
flippinekfaria

External SSH/PuTTY Connection - Failure!

Post by flippinekfaria »

Hi,

I thought I was doing well having installed Linux Mint (v17), finally managing to install and get WIFI working through a USB dongle and configured sshd to limit connection to public/private keys on a port of my own choosing. It works a treat from within my own network (the usual 192.168.0.nn or 192.168.1.nn whilst trying another router) but simply refuses to allow a PuTTY SSH connection from a Windows machine externally.

I have port forward my SSH designated port to the address of the server in my own network, confirmed the port open using "ping.eu" to check the port status with my external (ISP) WAN IP address from a machine outside my network and can see the "auth" logs acknowledging the 'ping' but see nothing at all when trying to fire-up a PuTTY ssh terminal from the same external machine. I thought it might be a restriction on my Virgin hub so have switched to "modem mode" and am now using a Netgear router (hence the new 192.168.1.nn IP ranges) but it does exactly the same, or should I say does nothing either!

I'm hoping I've missed something really obvious, with any luck just a PuTTY client setting on the external Windows 7 machine but have run out of ideas... so am 'throwing this out there' hoping someone smarter has any ideas or pointers for me?? Anyone got any idea what I might be doing wrong or missing to get the external/remote SSH client to connect?

Cheers.

PS My Linux Mint server remains up and I have double checked the DHCP IP address allocation, but it's not statically assigned on the server... does it need to be static regardless of being the correct IP address for SSH to work; as in does SSH care?!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
niowluka

Re: External SSH/PuTTY Connection - Failure!

Post by niowluka »

flippinekfaria wrote:does it need to be static regardless of being the correct IP address for SSH to work; as in does SSH care?!
SSH doesn't care, but your router might decide to give your server a different IP once current DHCP lease expires, so it is advised to make it static (either via Linux network settings or DHCP settings on the router).

If you see no logs of putty connecting in /var/log/auth.log then it doesn't even get to your SSH server, so I would suspect something wrong port forwarding, or putty setup (is it connecting to correct port?).

Run:

Code: Select all

nmap -p <server_port_number> localhost
nmap -p <external_port_number> <external_address_or_dns>
e.g.

Code: Select all

nmap -p 22 localhost
To confirm your ports (both internal and external) are indeed open. Also post your /etc/ssh/sshd_config.
flippinekfaria

Re: External SSH/PuTTY Connection - Failure!

Post by flippinekfaria »

Just closing the loop on this one after a looonnnngggggg time. Sorry about that but moving house twice and packing my servers into storage for several months kinda stopped play! Anywho, plugged it all back in and fired it up ready to tackle the problem and guess what... no problem.

I mentioned this to a clever chap at work who pointed out that it's highly likely I did nothing wrong at all and that the restriction was client side. I was trying to remote in from work, apparently the block was because work used various VPN and other gubbins preventing me establishing a proper ssh connection (despite being able to ping and ssh being a simple protocol). He proved the point as he still works for the company I've since left, and couldn't access my server from his work network.

So if you're having problems like I was then do what in hindsight is obvious, get down your mates/mums house and test from a clean connection before assuming the problems is with your setup!

Cheers.
Locked

Return to “Networking”