It's getting hard if you always plug HDMI cable to the raspberry pi, login and then turn the SSH service on with raspi-conf or other configurations methods.

Is there any way to turn the SSH service of a raspberry pi on after writing an operating system .img file like Raspbian to the SD-Card?


2 Answers 2


It's simple. After you write an .img file to the SD-Card, you can find a boot partition.
You just need to add an empty file that is named ssh without any format extensions in this partition. After that, plug the SD-Card into the raspberry pi and turn it on.
With the DHCP server of your Access point or something like that, you can find the IP address of the raspberry pi and try to make an SSH connection.

First method: Using PuTTY on Windows.
Second method: Using ssh client command on Linux: ssh pi@ (if the IP address is

Note that, the default username of Raspbian is pi and the default password is raspberry.


After you have imaged the card before you put it in your Raspberry Pi if you mount the filesystem you can create a file in the /boot folder named ssh and that will enable the SSH service upon first boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.