[SWLUG] using ssh to talk to a server?

Mark Summerfield mark at qtrac.eu
Fri May 2 11:24:59 UTC 2008


On 2008-05-02, Justin Mitchell wrote:
> On Fri, 2008-05-02 at 11:44 +0100, Mark Summerfield wrote:
> > What I'd really like it to be able to make both machines "trust" each
> > other, but without that trust extending past the router that they are
> > connected by (and that is connected to the Internet).
> >
> > Could I create a ~/.ssh/ssh_config file or some such on each machine to
> > do that?
>
> you can make an account on one machine be able to login to the other
> without a password.
>
> on the 'from' machine first run ssh-keygen, just hit enter to its
> questions, and dont set a password otherwise youve just moved the
> problem.
>
> this will create ~/.ssh/id_rsa and id_rsa.pub
>
> copy the contents of id_rsa.pub from the local machine and add it to the
> end of ~/.ssh/authorized_keys on the target machine. create the file if
> you have to.
>
> now whenever you ssh from an account that has the ~/.ssh/id_rsa file,
> into an account that has the ~/.ssh/authorized_keys file, it wont ask
> for a password.
>
> copy those files to any other accounts/machines that you need this to
> work for.

I already had thos rsa files (I think I had to generate them to be
allowed to edit the Python docs), but I didn't know what they were for.

Now I've make authorized_keys files on both my machines with the others'
id_rsa.pub contents---and it works a treat, ssh with no passwords:-D

One last question though: how do I use names instead of IP addresses so
I can write
    ssh percival
instead of
    ssh 192.168.2.3
etc?

Thanks!


-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu




More information about the Swlug mailing list