#SSH shenanigans
1 messages ยท Page 1 of 1 (latest)
yeah
Can you SSH to the machine and show me what this says
ls -lah ~/.ssh
cat ~/.ssh/authorized_keys
The ssh-copy-id command threw some errors so I#m not sure if it properly applied it.
Ah. It only works with linux server ๐
Also see here: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement
ok but which is the directory? c:/programdata/.ssh
for win 11
I believe this is the one
Please try my commands first
ls -lah ~/.ssh
says ls cannot access /home/chris/.ssh
Hmm
Give me a second
kk
jsyk, my ssh keys appear to be in the dir I mentioned above, it's where I found the known hosts file
I said SSH to it. As in from HA to your PC but yeah it's windows. There's no ls and cat. My bad.
In my case it's in C:\Users\Impact\.ssh
You want to look into the authorized_keys file there. known_hosts is a client thing.
Also described here: https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_keymanagement#standard-user
Hmm I think I found the culprit
your commands from above went through in ha terminal
and it listed the authorised keys, which were just 1
for my old pc
so I just have to add the same one,but for the new one
Yes, just paste the contents of the pub key in there on a new line. Use a proper editor that can handle linux file endings.
I got confused cos it was the same key and it just lists the whole encryption , I never read the last bit where it mentions the target machine
The x@y stuff at the end is just a comment
where do I find this dir
I ran the command in the HA terminal
supposedly it listed the files in the .ssh folder
but how do I get to it in the ui?
~ refers to the home dir of the user. You don't use that as it's not shared between the addon and HA. Hence we use /config. You don't get access via the UI. You can move it somewhere else though
cos the last command in the link above listed the authorised keys, and Im fixin to add the same line again for a different user this time, like you said above
I wanna find that file and add the line, manually
You do that on your PC, not HA
It does not
I meant you edit this file on your PC. Not on HA. Not in Samba (which is network access to HA). Forget HA for a moment. Use a editor on your PC and edit the file in C:\Users\youruser\.ssh\authorized_keys
this is all it says in there
ECHO is on.
ECHO is on.
Remove all of that and put your public key in there
yeah. went into id_rsa.pub, copied, pasted into the auth keys file like you said
ran the command again in ha terminal to ssh, still asks pw ๐
No clue why there would be ECHO is on in there
I can only suggest following the docs above again and checking the server and client logs. I'm too tired now
ok
thank you for your time
you helped me last time too ๐
will get it working np
I don't fully remember to be honest.