Pergunta

The OpenSSH ssh daemon is a useful tool for iPhone development.

I use it to connect my MacOS @ my phone quickly.

Is it possible to start the service directly from the terminal, without using some toggle?

Foi útil?

Solução

I assume you're using a terminal directly on the phone, otherwise how could you get in to turn on the ssh daemon, right?

Anyway, you can use this command to start the service:

launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist

and this one to stop it:

launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist

Note, that if you use this, and also have the SBSettings ssh toggle installed, its state (red=off, green=on) will be out of sync with the actual service. (You can just tap the SBSettings toggle a couple times, and it will be back in sync again)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top