On 7/6/26 00:19, Chris Green wrote:
This isn't a problem as such but I don't understand why it's happening
and I'd like to understand.

I have a VPS called isbd.biz and I access it using ssh.  My user
account on both my local machine (desktop and laptop) is 'chris' and
my user account on isbd.biz is also 'chris'.

I have account 'chris' on isbd.biz set up to allow login only using
public key authentication.

The ip address of isbd.biz is 213.171.194.64.

If I log in with 'ssh 213.171.194.64' I, correctly, get prompted for
my local system's public key passphrase and I can log in successfully.

However if I try 'ssh isbd.biz' I get prompted for"[email protected]'s password" 
which doesn't exist and I can't log in.

'host isbd.biz' returns the correct IP address for isbd.biz so why
does ssh not work using the name rather than the IP address?

Check your ssh client config file (should be at /home/chris/.ssh/config)
You probably didn't setup it for the host isbd.biz, or didn't put the IdentityFile directive correctly.
The host entry in your case should look like this:

Host isbd.biz
   HostName isbd.biz
   Port 22
   User chris
   IdentityFile ~/.ssh/my-ssh-key-for-isbd-biz.key


See "man ssh_config" if you want to know more about additional directives and syntax.

--

 With kindest regards, Alexander.

 Debian - The universal operating system
 https://www.debian.org

Reply via email to