jilleb / mib2-toolbox

The ultimate MIB2-HIGH toolbox.
MIT License
622 stars 145 forks source link

SSH password #143

Closed vwjap closed 3 years ago

vwjap commented 3 years ago

Describe the bug After connecting via ssh it asked me for a password, it’s the same as the adaptor password

To Reproduce Don’t know, presume it’s something to do with either software or the security update Vw did a while ago or I went in via hotspot in

Expected behavior Just typed the password in all access (although I only looked at the listing and changed the directory)

Firmware(please complete the following information):

Additional context The wiki implies you don’t require the password if you use wireless

just for info

andrewleech commented 3 years ago

Hi, the password prompt is only skipped if you provide a suitable id_rsa.pub key file, and then connect with SSH from the same computer/prompt the RSA key was generated from. This last bit probably needs to be made clear on the wiki

andrewleech commented 3 years ago

I've added extra notes as such to the wiki page https://github.com/jilleb/mib2-toolbox/wiki/SSH-Login

vwjap commented 3 years ago

I did, and then copied it to sd/custom/, then installed the shhd via the green menu,

andrewleech commented 3 years ago

Take another look at the updated ssh instructions, try running ssh with the -i ~/.ssh/id_rsa args. Also double check on the SD card, was the folder Custom with uppercase C ?

vwjap commented 3 years ago

Think is something to do with WSL as I can’t see my home directory when I’m logged in to the unit

andrewleech commented 3 years ago

I use WSL to connect. Once your connected you can't see your computer home directory, only what's in the unit. Did you generate the RSA keys from the same computer wsl prompt?

vwjap commented 3 years ago

so tried it again. had no luck again.when i ssh it says my home directory is root. and the only way back to my hard drive it exit ssh, tried lots of different ways to copy the key to.

Untitled

andrewleech commented 3 years ago

Ah, I see. You generated the ssh-keys and gave it the name id_rsa.pub - this was supposed to be generated with the default name id_rsa. Wen you generate keys, the private key is the one with the given name, then it automatically makes the public file as well and adds the .pub on the end; see you've got a id_rsa.pub.pub` as well.

You should generate the keys again and not change the default name. Then copy the new ~/.ssh/id_rsa.pub onto the sd card/Custom and re-install ssh from the green screen menu

vwjap commented 3 years ago

so ive kinda sorted it. after hours of creating a key and copying it over to the unit, it didnt wanna know. the .pub.pub file was my backup file that was all that was, so i did it in command prompt instead, then just copied some files across just to check, heres the result

ssh