[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh into a webserver on a shared host



Kevin Coyner <kevin@rustybear.com> writes:

> This is easily done when:
>
>     I have a useraccount on both machines under the same name (i.e.
>     kevin) and

This isn't a requirement;

>     I've generated a public key on my home machine using ssh-keygen and
>
>     copied that key to the .ssh/authorized_keys file on the host.
>
> But in my present case, the useraccount on my home box (client) is
> kevin, but the useraccount on the shared server (host) box is butakun.
>
> When I generate the publickey on the home box, it generates a key for
> kevin@homebox. I can upload this to the SSH server (host), but automatic
> signin obviously isn't going to happen.

Have you tried?  The label on an ssh keypair is just a label; you can
change it if you want, but it doesn't particularly need to match the
username or hostname you're ssh'ing from.  A very common thing to do
is to drop a bunch of public keys into root's authorized_keys file,
for example, so that a specified set of administrators can securely
log in to the machine from their own accounts without knowing (or
possibly even having) the root password.

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: