so I am looking to set up ssh private/public keys between two servers, for use with sftp (and ultimately lftp using sftp - but one step at a time).
I have created the private and public keys, and found that in order to use them, the private key must be owned and only readable by the user connecting.
The problem is, the user I am connecting as doesn't have a /home/ directory on either server (and only exists on the remote server), so when I try to chown
, I get chown: invalid user: {userName}
- because it doesn't exist locally.
Can anyone suggest a way around this?
--Edit--
I used getent passwd
on both servers, and found that the user only exists on the server I'm sftp
ing to. So when I connect as that user (sftp weirdUser@remoteHost
), how can I do this using private/public keys?