Closed andypnz closed 8 months ago
Try adding -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa
to your ssh command
Like this?
ssh -i id_rsa root@192.168.x.xx -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa
I get this:
'''(wallbox) C:\Users\andyp\wallbox\wallbox-pwn>ssh -i id_rsa root@192.168.x.xx -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa The authenticity of host '192.168.x.xx (192.168.x.xx)' can't be established. RSA key fingerprint is SHA256:KNTPYH++YWtjxKE6LwG/uErpXhfvwiGxxxxxxxxxxxx. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.x.xx' (RSA) to the list of known hosts. Load key "id_rsa": invalid format root@192.168.x.xx: Permission denied (publickey).
(wallbox) C:\Users\andyp\wallbox\wallbox-pwn>```
I think your ssh installation is too recent but try
ssh-keygen -f id_rsa -p
and then ssh again
(wallbox) C:\Users\andyp\wallbox\wallbox-pwn>ssh-keygen -f id_rsa -p
Failed to load key id_rsa: invalid format
I git cloned your repo... my local directory looks ok?
(wallbox) C:\Users\andyp\wallbox\wallbox-pwn>ls
README.md id_rsa id_rsa.pub pwnware.tar wallbox-pwn.py```
Yes. You need to figure out how to get your (relatively new) version of ssh to accept a (relatively old) rsa key
Thank you - will do some googling.... I am using a new anaconda install, so I guess thats why its a new version of ssh..... Can I use PuTTY to ssh in? Any idea how to use 'id-rsa' as they key?
I believe that’s fully doable, not sure how
Thanks.... I was able to ssh in using a windows command prompt :-)
But unsure what to do now:
C:\Users\andyp\wallbox\wallbox-pwn>ssh -i id_rsa root@192.168.x.xx
root@WBxxxxxx:~# ls
debs empty_test_db.sql telemetry telemetry_unsent.csv
root@WBxxxxxx:~# curl -sSfL https://github.com/jagheterfredrik/wallbox-mqtt-bridge/releases/download/bridge/install.sh > install.sh && bash install.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0
100 5952k 100 5952k 0 0 403k 0 0:00:14 0:00:14 --:--:-- 900k
MQTT Host (127.0.0.1):
Enter the ip of your mqtt broker
Ahh... obviously... Thank you!
So the config appears to be done - what is the topic name I need to look for? Just the device name?
I add the broker to home assistant and all will be automatically setup
Thanks.... I was trying to use a stand alone MQTT listening app.... looked at HA, sure enough all is auto configured...
A couple more questions if you don't mind:
Thanks again for all your hard work!
Thanks very much.... Just need to change my node-red flow to use this new method and not the WB integration....
Should I ask any questions here, or on the HA WB thread?
My first one is the HA integration provided a state - does the Status via MQTT report in the same way?
STATE 1: Ready 2: Unavailable 3: Charging 4: Disconnected 254: Paused 99: UNKNOWN
No, the states are here https://github.com/jagheterfredrik/wallbox-mqtt-bridge/blob/0af1539c8895ac55459e27b8505762b88bd63d03/app/wallbox/wallbox_const.go#L3
first one is 0, second one is 1, etc
Thank you again.... I am converting my Node Red charger control from using @hesselonline HA integration to instead use your local control - I have most everything working, but can see I will still have a few questions matching up the different states.... but that's a job for tomorrow :-) Thanks again for this great development - the local control is really fast, and such a good idea!
Awesome, good luck!
Hi... Successfully pwnd (thank you!!)
How do I now SSH - error below..... (charger has the latest firmware 5.17.87)
Thank you Andrew