Re: [Hampshire] confused ssh newbie

Top Page

Reply to this message
Author: Peter Andrijeczko
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] confused ssh newbie
What I tend to do (when it works despite bugs in the BT Home Hub firnware)
is link the incoming port number to the static IP address on my internal
network, especially useful if you are opening up multiple SSH ports.

Say, for example, I have a server on 10.1.1.28 and a NAS drive on
10.1.1.155. then I pick a two digit prefix and stick on the last number of
the IP address - so I would forward port 55028 to the server and 55155 to
the NAS drive. As long as you use port numbers >= 1024 and <= 65535, it's a
reasonable secure way of obfuscating port numbers while being able to
remember them easily enough.

--Peter

On 22 June 2011 08:45, john lewis <johnlewis@???> wrote:

> On Tue, 21 Jun 2011 21:09:25 -0500
> Mike Burrows <testermike@???> wrote:
>
> > Hi folks.
> >
> > I can ssh into my debian machine on port 22 (with that port forwarded
> > on my router) using
> >
> > ssh testermike@???
> >
> > However, when i change the port to 2222 (changing the router of
> > course) and repeat using
> >
> > ssh -p 2222 testermike@???
> >
> > I get an error that the connection was reset by peer and I cannot ssh
> > in.
> >
> > What am I not doing please?
>
> what you should _not_ have done is tell the world you have changed the
> port number to 2222 ;-(
>
> I changed the port I ssh into on my VPS and put a couple of lines into
> ~/.ssh/config as below
>
> Host IP address
>        Port xxxx
> Host Domain Name
>        Port xxxx

>
> that saves the need to use the '-p port' flag to ssh.
>
> Did you restart sshd on the remote machine?
>
> --
> John Lewis
> using Debian sid
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------
>