No I didn’t disable password login first and was prompted for the password when copying the file. I turned off pwd auth to try to force the key auth which is when I got the error I mentioned. (So I turned it back on.)
Indeed -vvv is my friend: more info, new mystery .
I get a series of errors like:
debug1: Trying private key: /home/biscotty/.ssh/id_rsa
debug3: no such identity: /home/biscotty/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/biscotty/.ssh/id_ecdsa
debug3: no such identity: /home/biscotty/.ssh/id_ecdsa: No such file or directory
dot, dot, dot.
I can see in my .ssh directory 2 files for the servermachine, one without extension and one with .pub (I think this is the one it wants). But no file with the specific name it seems to want.
Sorry, lost track of this thread; what I’m saying is, by using the -i flag on ssh you’re specifying the identity file (private key) to use. Clearly, ssh is ignoring your flag, otherwise it wouldn’t try to search for those other two files.
As an alternative to the command line flag, I suggest writing a ~/.ssh/config like this (while substituting things in <> for what you actually need):
# ~/.ssh/config
Host <servermachine>
HostName <servermachine.com>
User <user>
IdentityFile /home/user/.ssh/servermachine
The private key is in fact what you need according to the docs, but the public ket will work too, assuming the private one is in the same place as the public one with .pub removed.
You are fantastic, thank you. There’s sure no need to apologize. Any effort you make is a gift of your time and I appreciate it.
Switching to NixOS reminds me of when I first started using Slackware. Since I moved away from Slackware I’ve done a lot less of editing configs, scripting, etc. In some ways this is a back-to-the-basics experience. And I’m really enjoying it.