#SSH shenanigans

1 messages ยท Page 1 of 1 (latest)

echo jackal
#

Gonna thread this since it's kinda unrelated to HA at the moment

unreal sierra
#

yeah

echo jackal
#

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.

unreal sierra
#

ok but which is the directory? c:/programdata/.ssh

#

for win 11

#

I believe this is the one

echo jackal
#

Please try my commands first

unreal sierra
#

I did

#

it asks for the directory

echo jackal
#

Huh?

unreal sierra
#

ls -lah ~/.ssh

says ls cannot access /home/chris/.ssh

echo jackal
#

Hmm

unreal sierra
echo jackal
#

Give me a second

unreal sierra
#

kk

#

jsyk, my ssh keys appear to be in the dir I mentioned above, it's where I found the known hosts file

echo jackal
#

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

unreal sierra
#

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

echo jackal
#

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.

unreal sierra
#

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

echo jackal
#

The x@y stuff at the end is just a comment

unreal sierra
#

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?

echo jackal
#

~ 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

unreal sierra
#

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

echo jackal
#

You do that on your PC, not HA

unreal sierra
#

yeah

#

but I don't think samba has access to the root folder of HA

echo jackal
#

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

unreal sierra
#

this is all it says in there
ECHO is on.
ECHO is on.

echo jackal
#

Remove all of that and put your public key in there

unreal sierra
#

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 ๐Ÿ˜„

echo jackal
#

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

unreal sierra
#

ok

#

thank you for your time

#

you helped me last time too ๐Ÿ˜„

#

will get it working np

echo jackal
#

I don't fully remember to be honest.

wise flame
#

im using this addon: Advanced SSH & Web Terminal
Having issues addin 2 public keys ....
Anyone have a working example ???

#

1 works fine...