How to: Disable SSH on reboot on your iPhone, iPad or iPod touch

Reading Time: 2 minutes

Photo credit: andrewasmith (Flickr)

Chances are you’ve arrived here by Google search and already know what SSH is. For those that don’t know, a brief introduction is in order.

Wikipedia describes SSH as:

Secure Shell or SSH is a network protocol that allows data to be exchanged using a secure channel between two networked devices.

Stock (read unjailbroken) iOS devices don’t have any SSH functionality installed upon them. Even jailbroken devices don’t as standard. You have to actively choose to install something like OpenSSH (from Cydia’s repositories) in order to get SSH capabilites on your iOS device. Those that choose to install it do so in order to enable direct access to their iDevice’s file system from a computer.

Once SSH is installed on an iOS device it will automatically start the SSH service each time the device is powered up (including after reboots). If the default password “alpine” isn’t changed to something else, devices are vulnerable to attack when connected to wireless networks . Many people use the SBSettings (Cydia) app to toggle SSH off when they aren’t actively using the service therefore mitigating their risk.

Disabling auto start of SSH

I’ve been asked a several times if there’s a more permanent way to stop SSH from auto enabling when (re)booting an iPhone / iPad / iPod touch. Sadly, I’ve yet to find one, but if you’re desperate to find a way to do so, I urge you to read these words before proceeding any further:

SSH switching on on phone startup is by design. If you were to ever mess your phone up and get stuck in the endless boot cycle or stuck on the Apple logo you’d have a window open to SSH in and remove the offending program. Without this feature you’d be out of luck and need an entire restore. I don’t think it’s possible to stop this behaviour, but like I said you really don’t want to as it’ll save you headache in the future.

Quote source: Mac Rumours Forum (moussekateer)

OpenSSH uses no battery power and therefore you should leave it enabled. Yes, it might be a pain to remember to toggle SSH off each time you (re)boot if you’re going to leave the default password as is; the better solution is not to toggle it off at all, but to change the default password. Thankfully we’ve got a guide for just that right here: How to: Change the default SSH password of your iPhone, iPad or iPod touch

  • Vector_Rain

    [DISABLED SSH STATUP – spanish]

    Existe la posibilidad de deshabilitar ssh (y SBSetings) del arranque del sistema.
    Aunque es posible que solo funcione para la version 4.3.2 del iPad (donde lo he probado), puede sea compatible con todas las iOS 4.3.x o incluso 4.x

    Tanto por ssh o iFile buscar el siguiente archivo:

    En él encontraréis unas lineas referentes a ssh. Por defecto aparece el atributo ‘disabled’ a ‘false’. Con poner ‘true’ ya está hecho. El demonio sshd ya no arrancará con el sistema.

    Este proceso tiene una pega, y es que a veces (sobre todo tras sincronizar con iTunes), el archivo se reestablece solo.

    Lo único que se puede probar en este punto es cambiarle los permisos a 400 (actualmente 600) con el comando:
    chmod 400 overrides.plist

    Otros archivos interesantes:

    /var/mobile/Library/Preferences/   (bluetooth)   (volumen)

    /var/preferences/SystemConfiguration/   (device name)

    Traducirlo y difundidlo, que hasta la fecha no se había dado respuesta y esta es la única web que no requiere registro. (Vamos, que no me voy a registrar el los foros para contarlo).

  • Hermo_t

    Please translate to english

  • Dito


    There is a possibility to disable ssh (and SBSettings) on boot.
    Although you may only work for version 4.3.2 on the iPhone (which the original author tested), it can be compatible with all 4.3.x even iOS 4.x

    Using either ssh or iFile, locate the following file:

    / var / db / launchd.db / / overrides.plist

    You will find some lines regarding ssh. By default the attribute ‘disabled’ is set to ‘false’. By setting it to ‘true’, the sshd daemon will not start on reboot.

    There is a catch: Sometimes (especially after syncing with iTunes), the file is restored.

    The only solution is to change the permissions to 400 (now 600) with the following command:

    chmod 400 overrides.plist

    Other interesting files:

    / var / mobile / Library / Preferences / (bluetooth) (volume)

    / var / preferences / SystemConfiguration / (device name)

%d bloggers like this: