Page 1 of 2 12 LastLast
Results 1 to 10 of 14
Discuss [SSH] A way to turn it off in 5a240d? at the PwnageTool - Hackint0sh.org; Is there a way to turn off SSH using SSH? Or is the only option ...
  1. #1
    Newbie Array

    Join Date
    Feb 2008
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default [SSH] A way to turn it off in 5a240d?

    Is there a way to turn off SSH using SSH?

    Or is the only option at the moment to un-tick the SSH option when building firmware.

    Jack.



  2. #2
    Professional Array

    Join Date
    Jan 2008
    Posts
    85
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    11

    Default

    You can connect to your iPhone through ssh and terminate the ssh daemon. Find the pid with

    ps -A

    and than

    kill pid term
    Last edited by Macom2008; 04-15-2008 at 10:58 AM. Reason: formatting

  3. #3
    Senior Professional Array

    Join Date
    Jul 2006
    Posts
    222
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    20

    Default

    Unfortunately this doesnt work as it just automatically restarts...

  4. #4
    sam
    sam is offline
    Chief of Administration
    iPhone Dev Team
    Array sam's Avatar

    Join Date
    Jun 2007
    Posts
    1,852
    Post Thanks / Like
    Downloads
    35
    Uploads
    277
    Rep Power
    10

    Default

    If you don't need it, deselect upon building your custom ipsw Other than that tried to kill -9 it? If that not works, edit config and reboot?
    Last edited by sam; 04-16-2008 at 10:20 AM.

  5. #5
    Senior Professional Array

    Join Date
    Jul 2006
    Posts
    222
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    20

    Default

    Quote Originally Posted by sam View Post
    If you don't need it, deselect upon building your custom ipsw Other than that tried to kill -9 it? If that not works, edit config and reboot?
    That's just it though; I do need it on occasion, but not all the time. I suppose I could remove the launchdaemon, but once you do that there's no easy way to get it back on (Though I guess a USB solution like iFunstastic would work). I'd write an app that turns it on/off, but I'm not sure how to since it keeps relaunching... (Even after a kill -9)


  6. #6
    Newbie Array

    Join Date
    Oct 2007
    Posts
    9
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    To kill the SSH Daemon in 5A240D use the following command:
    kill `cat /private/var/run/sshd.pid`

    To start the SSH Daemon use the following command:
    /usr/local/sbin/sshd

    To disable the SSH Daemon on Reboot use the following command:
    launchctl unload -w /System/Library/LaunchDaemons/com.devteam.openssh.sshd.plist

    To enable the SSH Daemon on Reboot use the following command:
    launchctl load -w /System/Library/LaunchDaemons/com.devteam.openssh.sshd.plist

    There are better ways of configuring the SSH Launch Daemon plist to allow unloading and loading the daemon process directly, but I will not go into that since it does not apply to the default configuration of firmware 5A240D by the dev team.

  7. #7
    Senior Professional Array

    Join Date
    Jul 2006
    Posts
    222
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    20

    Default

    Quote Originally Posted by freshster View Post
    To kill the SSH Daemon in 5A240D use the following command:
    kill `cat /private/var/run/sshd.pid`

    To start the SSH Daemon use the following command:
    /usr/local/sbin/sshd

    To disable the SSH Daemon on Reboot use the following command:
    launchctl unload -w /System/Library/LaunchDaemons/com.devteam.openssh.sshd.plist

    To enable the SSH Daemon on Reboot use the following command:
    launchctl load -w /System/Library/LaunchDaemons/com.devteam.openssh.sshd.plist

    There are better ways of configuring the SSH Launch Daemon plist to allow unloading and loading the daemon process directly, but I will not go into that since it does not apply to the default configuration of firmware 5A240D by the dev team.

    Still no dice... kill `cat /private/var/run/sshd.pid`doesn't work...

    I don't have a /private/var/run/sshd.pid, but even if I did this would be the same as just running kill on sshd's pid, which restarts it. ps indicates sshd was run with a -R flag, maybe that has something to do with it?

  8. #8
    Newbie Array

    Join Date
    Oct 2007
    Posts
    9
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by appleguru View Post
    Still no dice... kill `cat /private/var/run/sshd.pid`doesn't work...

    I don't have a /private/var/run/sshd.pid, but even if I did this would be the same as just running kill on sshd's pid, which restarts it. ps indicates sshd was run with a -R flag, maybe that has something to do with it?
    All of the processes running with the -R flag are the client connections. The only process that needs to be killed to stop the daemon is the one without the -R flag. It should be listed as /usr/local/sbin/sshd

    You will not have a /private/var/run/sshd.pid if the /usr/local/sbin/sshd process is killed already.
    Last edited by freshster; 04-16-2008 at 10:47 PM. Reason: Added Comments...

  9. #9
    Jedi Admin Array

    Join Date
    Sep 2007
    Location
    sao paulo, brasil
    Posts
    1,242
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    worked for me

    ...until i restarted it

    EDIT:

    launchctl unload -w /System/Library/LaunchDaemons/com.devteam.openssh.sshd.plist

    worked even after restart no SSH

    N41
    Last edited by Number_41; 04-20-2008 at 08:28 AM.
    MSN/AIM? PM me
    If you want to become a Hackint0sh supporter click here.
    I DO READ PM's

    "Just because I'm losing
    Doesn't mean I'm lost
    Doesn't mean I'll stop
    Doesn't mean I will cross

    Just because I'm hurting
    Doesn't mean I'm hurt
    Doesn't mean I didn't get what I deserve
    No better and no worse "

  10. #10
    Senior Professional Array

    Join Date
    Jul 2006
    Posts
    222
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    20

    Default

    Quote Originally Posted by Number_41 View Post
    worked for me

    ...until i restarted it

    EDIT:

    launchctl unload -w /System/Library/LaunchDaemons/com.devteam.openssh.sshd.plist

    worked even after restart no SSH

    N41
    How do you turn it back on though?


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 04-27-2011, 04:10 PM
  2. MacNN: Google denies plans to bring turn-by-turn GPS to iPhone
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 04-23-2010, 11:50 PM
  3. Replies: 0
    Last Post: 04-23-2010, 02:50 PM
  4. Replies: 0
    Last Post: 10-08-2009, 10:40 PM
  5. Replies: 0
    Last Post: 06-10-2009, 10:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 02:23 AM.
twitter, follow us!