offensive-security / kali-arm-build-scripts

Kali Linux ARM build scripts
874 stars 374 forks source link

Enabling SSH For Headless Setup? #119

Closed jsl303 closed 6 years ago

jsl303 commented 6 years ago

Can we have an option to enable ssh and root login when running Kali headless? For example in Raspbian, you can enable SSH by placing a file named “ssh” (without any extension) onto the boot partition of the SD card. Can something like this be implemented?

steev commented 6 years ago

ssh is already enabled on the arm images, which images are you having this issue on?

it may be possible to do it that way, but, i'd have to look into how they're doing so.

jsl303 commented 6 years ago

I'm having a problem with kali-2017.3-rpi3-nexmon.img.xz.

Re4son commented 6 years ago

@steev: don't bother with the Raspbian way. They are running a service that looks in /boot for a file and enables the ssh service if present. I'm doing something similar in my pi-tail. Very messy and you don't need it as the service is running already.

The issue with ssh is missing host keys. We have to run "dpkg-reconfigure openssh-server" to generate them.

Update: Just found the nifty "regenerate_ssh_host_keys.service" and the problems with it. Also found the pull request to fix it. That fix is working for me.

steev commented 6 years ago

Thanks for pointing it out @Re4son will pull now

steev commented 6 years ago

Closing the issue as this is now fixed and released.