Ich will mit dropear die sd karte entschlüsseln über ssh
habe den public key soweit exportiert und lässt sich soweit nutzen aber nachdem reboot kommt das:
root@pc:~# ssh -i "~/.ssh/remote_dropbear_id_rsa"
[email protected]
The authenticity of host '192.168.1.199 (192.168.1.199)' can't be established.
ECDSA key fingerprint is SHA256:zA+QC/UCaKowl+nNlKWpC1ZkwNjs+GqOsR0A4SIkK1c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.199' (ECDSA) to the list of known hosts.
Load key "/root/.ssh/remote_dropbear_id_rsa": invalid format
[email protected]: Permission denied (publickey).
habe aber mit
root@kali:/etc/dropbear# dropbearkey -y -f dropbear_rsa_host_key dropbear_rsa_publickey.pub
export funkt nicht habe aber return value also .pub key gespeichert und zu meinem pc übertragen und nun kommt der fehler wie oben angezeigt
root@pc:~# nano /root/.ssh/remote_dropbear_id_rsa
ssh-rsa AABAB3NzaC1yc2EAAAADAQABAAABAQCTf5rNHAgh2IYPb7Tal0 FrSTxkMkrjtIXHQsK0mzhmxELGzunj0VxAXE$
vor dem reboot ging der ssh connect über diesen befehl:
ssh -o "UserKnownHostsFile=/etc/dropbear/dropbear_rsa_host_key" -i "~/.ssh/remote_dropbear_id_rsa"
[email protected]
nach dem reboot muss ich einmal
ssh-keygen " -R "192.168.1.199"
ausführen um reconnecten zu können aber danach geht nix mehr und führt zu dem error oben
last stauts
ssh -o "UserKnownHostsFile=/etc/dropbear-initramfs/authorized_keys" -i "~/.ssh/remote_dropbear_id_ecdsa"
[email protected]
Permissions 0555 for '/root/.ssh/remote_dropbear_id_ecdsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/root/.ssh/remote_dropbear_id_ecdsa": bad permissions
[email protected]: Permission denied (publickey).
solved over chmod 600 ~/.ssh/remote_dropbear_id_ecdsa
still getting connection error Permission denied (publickey).
maybe i have to use these keys? but i cant find the directory
root@kali:~# lsinitramfs /boot/initramfs.gz | grep cryptsetup
root@kali:~# lsinitramfs /boot/initramfs.gz | grep
authorized
root-Ilip7P/.ssh/authorized_keys
what i dont get at all which format does the public and private key have.
Generating Dropbear RSA host key. Please wait.
Generating 2048 bit rsa key, this may take a while...
2048 SHA256:It01Ls4mbIT2SNWs+owCBB9QANH0lUeIfl3ZGi8yEsY root@kali (RSA)
+---[RSA 2048]----+
|*Bo o.+. o |
|. o...Eo. + . |
|.. o...+o.o+ |
| .. .+oo+oo.. |
|. =.=.So.. |
|. o B + . |
| . o = + |
| . = o |
| .. o |
+----[SHA256]-----+ install generated key
dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key2
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCGTBzfJdTnGbgieyuhRR tkn+Jirc6t8K8I0HKbclw7SbQc7hrKF716VGvmNhylPjljbK0x 0hWgcJpdNGYy7w6vSwXtfDhR1oPFt/ltAkMxmvXeHy3BCfV6JRXDe8DdpyqnB5KY2uoRhXFocYNx2yDm 4qslVKxpcx1QXBQ/3/DjZ45Kd2E8efNmIpUOoxheQFgP2rumZqUpWWazD2vdsCWjy42T oQrVBek7uuBWUohlc0AX1KpyBW8uJIdSmCOWpuENp0XRBdRIA6 N7xBBXsAWmxnVxZGQIVP6fNOh3Arl6hCSsaAQk931j9usCy8ex GO3QUqL4apu1dYHpJoyIBRD7 root@kali
Which format has a dropbear ssh file?
I get this:
Warning: Permanently added '192.168.1.199' (ECDSA) to the list of known hosts.
Load key "/root/.ssh/remote_dropbear_id_rsa": invalid format
what does the file have to look like?