Launchctl Error Unloading Com.openssh.sshd
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Command Line SSH restart Mac OSX Mountain Lion up vote 23 down vote favorite 10 How can I restart the SSH service via the command line on Mac OSX Mountain Lion please? Using ps aux | grep 'ssh', I was able to deduce that the process is most likely /usr/sbin/sshd. From here I searched the sshd documentation for references to 'restart' but found none. I don't know what my next step should be. mac command-line ssh osx-mountain-lion sshd share|improve this question asked Sep 21 '12 at 18:09 James Webster 2511213 2 What are you actually trying to accomplish? If it's something like reloading the sshd config, you don't need to -- launchd starts a new sshd process on demand when an incoming connection is received, which means that the config is automatically reread for each new connection. OTOH, if you're trying to change the listener settings, those are controlled by launchd not the sshd config at all (see here). –Gordon Davisson Sep 22 '12 at 1:47 This was just one test of debugging a password request from supposedly passwordless ssh using public keys. Turns out the thing I has missed was to turn off StrictMode –James Webster Sep 22 '12 at 8:10 add a comment| 3 Answers 3 active oldest votes up vote 13 down vote accepted See this answer to a similar question on ServerFault. The command should be the same in Mountain Lion. You can stop the service using the 'unload' subcommand. sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist Update suggested by @MattClark: To restart the service use load after unload: sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist sudo launchctl load -w /System/Library/LaunchDaemon
/r/jailbreak for news and updates. You can use Cydia Impactor if you need to un-jailbreak an 8.1-8.4 device without restoring. Instructions for jailbreaking iOS 8.0-8.4. Before asking a question, check Frequently Asked Questions to find quick answers! How to fix some mysterious problems.
How can I stop OpenSSH from autostarting? 8 4 I have the SSH toggle via SBSettings. Every time I reboot the phone, though, I have to remember to go into SBSettings and turn off SSH. Is there a way to make the SSH service not automatically start, but let me enable it via SBSettings only http://superuser.com/questions/478035/command-line-ssh-restart-mac-osx-mountain-lion when I want it ? openssh asked 21 Feb '11, 12:37 jkister 256●31●19●40 edited 21 Feb '11, 22:13 Endareth 6.7k●23●22●39 I don't know the answer to your question, but I can tell you this: OpenSSH doesn't actually use any battery or CPU unless you're actively 'talking' to it, so, if you've changed your password, it shouldn't be a problem. (21 Feb '11, 22:05) http://www.jailbreakqa.com/questions/15706/how-can-i-stop-openssh-from-autostarting spockers ♦♦ 3 It's still a potential security risk. Safer to have it disabled by default. You never know when an exploit for the installed version will be found. (21 Feb '11, 22:08) Endareth Answers oldestnewestmost voted 12 Ok, I've refreshed my memory for this one. iOS uses the same process as OS X for handling launch processes, so all you need to do to stop the ssh server from running at start time is: Get to a command line (MobileTerminal or ssh in). su to get root access Run the following command then restart! launchctl unload -w /Library/LaunchDaemons/com.openssh.sshd.plist You should now have ssh off in SBSettings, and it can be toggled on as normal. To change it back, just use "load" instead of "unload"! link answered 22 Feb '11, 06:26 Endareth 6.7k●23●22●39 edited 22 Feb '11, 06:26 thanks Endareth, that's exactly the behavior i was looking for. (22 Feb '11, 10:53) jkister If that answers you question, please flag it as the correct answer to make it easier for other people after the same info :) (22 Feb '11, 18:19) Endareth I followed your steps but the Termi