From charlesreid1

No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
I am unable to determine the answer to this question: is SSH enabled by default on Kali Linux Raspberry Pi images? Or am I screwing something up on my router?
=SSH To-Do=


==SSH is on by default==
There are a couple of SSH-related things you should do post-install for your Kali 2.0 Raspberry Pi. These steps are covered in the "Fix SSH" section of the Kali Raspberry Pi post-installation procedure: [[Kali Raspberry Pi/Post-Install#Fix SSH Keys]]


This 2-year-old Kali bug indicates that SSH was enabled on Kali Raspberry Pi images: https://bugs.kali.org/view.php?id=464
=Fix SSH To Run On Boot: Procedure=


But that was two years ago, and it was inconsistent with what they were doing with other Kali Linux images, so it's dubious whether this information is still accurate.
First, your SSH server should be installed. If not,


==SSH is off by default==
<pre>
apt-get install openssh-server
</pre>


As indicated by my experience with other Kali installations, and as mentioned in the thread above, Kali installations don't have SSH enabled by default.
Second, revert to SSH defaults, which will run SSH on boot:


The question, then, is whether Kali went with PRINCIPLE (not enabling SSH, because they just don't do that) or PRACTICALITY (if you don't enable SSH on a Raspberry Pi, you're now assuming that every RPi user wants to go out and buy a keyboard, mouse, display, and adapter dongle, which is ridiculous).
<pre>
update-rc.d -f ssh remove
update-rc.d -f ssh defaults
</pre>


==The Meta-Realization==
On a fresh Kali install, replace the SSH keys that come with the image, as these are easy to spoof:


The meta realization is, it doesn't fucking matter.
<pre>
cd /etc/ssh/
rm ssh_host_*
</pre>


You can do whatever the fuck you want with a Kali Linux installer.
Finally, make new SSH keys:


If you aren't on a Mac, once you format the SD card to have the Kali Linux Raspberry Pi installer, you can mount both the boot and the Linux partitions of the SD card, and modify it so that the Pi will start any service you want.
<pre>
dpkg-reconfigure openssh-server
</pre>


[[Category:Kali]]
=Startup Services In General=
[[Category:Raspberry Pi]]
 
If you want to run any startup service, not just SSH, read on: [[Kali Raspberry Pi/Startup Services]]
 
{{KaliFlag}}
{{PiFlag}}

Latest revision as of 02:25, 18 January 2016

SSH To-Do

There are a couple of SSH-related things you should do post-install for your Kali 2.0 Raspberry Pi. These steps are covered in the "Fix SSH" section of the Kali Raspberry Pi post-installation procedure: Kali Raspberry Pi/Post-Install#Fix SSH Keys

Fix SSH To Run On Boot: Procedure

First, your SSH server should be installed. If not,

apt-get install openssh-server

Second, revert to SSH defaults, which will run SSH on boot:

update-rc.d -f ssh remove
update-rc.d -f ssh defaults

On a fresh Kali install, replace the SSH keys that come with the image, as these are easy to spoof:

cd /etc/ssh/
rm ssh_host_*

Finally, make new SSH keys:

dpkg-reconfigure openssh-server

Startup Services In General

If you want to run any startup service, not just SSH, read on: Kali Raspberry Pi/Startup Services