Come posso abilitare SSH senza utilizzare l'interfaccia grafica o AppleScript su leopardo delle nevi?

apple.stackexchange https://apple.stackexchange.com/questions/13102

  •  22-10-2019
  •  | 
  •  

Domanda

Qualche tempo fa qui Come posso attivare la condivisione Internet senza utilizzare l'interfaccia grafica o AppleScript? ho chiesto se qualcuno sa come attivare la condivisione Internet senza utilizzare GUI o AppleScript, ho ancora quel problema, ma ho pensato che questo dovrebbe essere più facile, voglio essere in grado di SSH nella mia macchina, ma abbastanza sicuro che non posso andare al riquadro "condivisione" nelle Preferenze (Si blocca). Come posso iniziare sshd?

È stato utile?

Soluzione

You can enable SSH from the Terminal with:

sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

(note that you need to run this as an admin, and it'll ask for your admin password, which won't echo as you type.)

Altri suggerimenti

Here's the command to start VNC sharing -- not SSH, but perhaps it will help you (be sure to replace the password with your own!):

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw PutYourOwnPasswordHere -restart -agent -privs -all

Then you should be able to log in using a VNC client with the password you specified.

Here's the command to stop sharing:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off

Note that the Sharing pane will NOT show that sharing is active when you turn it on this way via the command line!

Source: http://technotes.twosmallcoins.com/?p=279

sudo systemsetup -setremotelogin on
sudo systemsetup -setremotelogin off
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a apple.stackexchange
scroll top