Sign in to follow this  
Followers 0

osx Disable SSH Preference via Terminal

5 posts in this topic

Posted

Hi All,

How would one disable SSH via the Terminal in OS X? Specifically I'm looking how to permanently disable this setting via a script:

post-180771-0-11270800-1358160854.png

Thanks

Chris

Share this post


Link to post
Share on other sites

Posted

I don't use os x all that much, but its lots is the same as any linux distro. You could always stop the service via the service command, its controlled with sbin/service is in not so ssh stop should do it.

As to how to make it not start again on reboot - hmm

os x uses system/library then like coreservices, services, etc. for its startup stuff?? Have never had desire to look that deep into the os before. Not really a fan ;)

so you can for sure stop it with /sbin/service or it seems the more uptodate launchctl -- but its going to just restart on reboot I would think. Just tested

post-14624-0-93949300-1358176924.jpg

Share this post


Link to post
Share on other sites

Posted

Hi,

I am not near my Mac right now but I believe the SSH is combined within "Remote Login" but you can stop the service or close port 22.

Share this post


Link to post
Share on other sites

Posted

I seem to have a few unusual connections in netstat considering my configuration, any advice?

post-105752-0-76184500-1358410359.png

post-105752-0-69637800-1358410361.png

Share this post


Link to post
Share on other sites

Posted

and how is that related to remote login? Or odd? or unusual in anyway?

That is your box on 10.0.0.8 connected to Apple network

NetRange: 17.0.0.0 - 17.255.255.255

CIDR: 17.0.0.0/8

NetName: APPLE-WWNET

OrgName: Apple Inc.

Looks like a push notification IP to me

dig -x 17.172.233.118 +short

st11p01st-hpaj262312-bz.push.apple.com.

And for verification of that assumption your connected on port 5223 -- which is a well known port used by apple products

https://support.apple.com/kb/TS1629

5223 TCP Apple Push Notification Service - - iCloud DAV Services (Contacts, Calendars, and Bookmarks), APNS, FaceTime, Game Center, Photo Stream, Back to My Mac

Nothing to do with the thread at hand though ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.