On Sun, 8 Nov 2009 18:58:06 Bob Williams wrote:
On Sunday 08 November 2009 07:48:36 Rodney Baker wrote:
On Sat, 7 Nov 2009 09:25:41 Bob Williams wrote:
[...] 21:08 barrowhillfarm:~> ssh bob@192.168.1.12 ssh: connect to host 192.168.1.12 port nnnn: Connection timed out
The desktop machine is configured to use a high numbered port nnnn rather than 22 as I was getting a lot of unwanted login attempts on port 22. However, I'm assuming that an ssh request from desktop to headless will try port 22 on the headless server.
Bob,
You can specify the port number to connect to on the ssh command line using the -p switch. For example, to connect to my father's machine behind his NAT firewall from my local network I use:
ssh -p <portnum> user@remoteserver.domain
Thanks Rodney. I've finally got there, once I'd cut a hole in my firewall!!
Yep - that'll do it.
Because of setting my internet facing machine's port number to a non-standard one, I do have to specify port 22 for this particular connection, but I've added
Host hostname Port 22
to ~/.ssh/config
so now I don't have to remember to specify it each time. In your case, you would add
Host remoteserver.domain Port <portnum>
and then you could login to his machine with
ssh user@remoteserver.domain
Good tip - I hadn't thought of that. He actually has multiple devices at the same hostname though, with different nat ports to access them externally (they don't have unique publicly accessible hostnames, so I use different ports to access for example his desktop machine (for maintenance and support), his NAS box or his DSL modem/router. What's really cool is that he's actually really liking openSUSE (he's still on 10.3/KDE3 as his machine probably isn't quite grunty enough for 11.2/KDE4) in preference to Vista on his laptop. He told me he actually prefers to use the desktop running linux for most things and he really wants to get Vista off his laptop :-). Chalk up another one for Linux (but all this is getting OT for this discussion...). -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org