Hi all!
I’m using the Terminal & SSH add-on v9.6.1. I’m trying to set up ssh login with keyfile. I’ve done the following to create my keypair:
ssh-keygen -t rsa -b 4096 -C [email protected]
I copied the public key generated into the YAML config for the add-on. I notice on “save” it mangles the file slightly, splitting the key input over several lines, but appears to start the SSH server with no issue. The YAML ends up looking like this:
authorized_keys:
- >-
ssh-rsa
AAAAB3Nza......./DyEFzF4BSFQAEtEDLJc6IwxafBwD02wzglzkHMaJAurutfdvoyQrM9lsuvTq0cQ797g1P+SQ==
[email protected]
password: ""
apks: []
server:
tcp_forwarding: false
I then try to connect using the private key thusly:
ssh -i /root/ssh/ha_key [email protected]
And I just get “Permission denied (publickey,keyboard-interactive).” and a note in the log on HA side: “Connection closed by authenticating user root 192.168.0.10 port 60388 [preauth]”
Can anyone point me where I’m going wrong?
I’ve tested and can connect OK using password if I just use the “password” directive and no key, but that’s not much good as I’m trying to script a scp file copy.
Thanks!