Page 1 of 2 12 LastLast
Results 1 to 10 of 19
Discuss [2.0.1][2G iPhone] Bossprefs can stop ssh but can't start it at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; BossPrefs was working fine with me since I've upgraded from 1.1.4 to 2.0.1 using pwnage ...
  1. #1
    Senior Professional Array Boiling Ice's Avatar

    Join Date
    Jun 2006
    Posts
    127
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    14

    Default [2.0.1][2G iPhone] Bossprefs can stop ssh but can't start it

    BossPrefs was working fine with me since I've upgraded from 1.1.4 to 2.0.1 using pwnage tool 2.0.2.. but now I have the following situation:

    Wifi --> enable/disable works fine
    edge --> enable/disable doesn't work (both old and new methods are not workings since the begining)
    SSH --> I'm able to disable, but can't enable. When I reboot my iPhone, ssh starts autoamtically... don't know how..

    I've uninstalled both bossprefs and openssh, reboot, install both, reboot and but still the same situation.

    Any suggestions before I restore?? XD

    ***** EDIT 1 *******
    ftb32 suggested to use "Toggle SSH", but still that didn't help to enable SSH
    Last edited by Boiling Ice; 08-13-2008 at 08:11 PM.



  2. #2
    Senior Professional Array

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

    Default

    I have the same problem on my 3G iPhone. I found that if you have the phone on and try to start SSH it doesnt work. However if you start SSH and restart phone its fine, and to turn off, turn it off and restart phone.

  3. #3
    Senior Professional Array Boiling Ice's Avatar

    Join Date
    Jun 2006
    Posts
    127
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    14

    Default

    once I reboot my iPhone, I'm able to ssh successfully. once I use BossPrefs to disable ssh, that's it... I can't use ssh till my next reboot!!!

  4. #4
    Senior Professional Array ftb32's Avatar

    Join Date
    Sep 2007
    Location
    Caracas Venezuela
    Posts
    104
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    12

    Default

    Toggle SSH tray

  5. #5
    Rookie Array

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

    Default

    I have similar problem .Hope bosspref brings out an update soon solving it.


  6. #6
    Senior Professional Array Boiling Ice's Avatar

    Join Date
    Jun 2006
    Posts
    127
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    14

    Default

    Quote Originally Posted by ftb32 View Post
    Toggle SSH tray
    tried it just now, but still can't enable ssh

  7. #7
    Professional Array

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

    Default

    ssh doesnt even kill the battery why do you care if its on all the time?

  8. #8
    Senior Professional Array unl0cker's Avatar

    Join Date
    Jul 2007
    Location
    In my Mind
    Posts
    128
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    14

    Default

    Let's try to focus on the problem! Not why ppl want to try do something!
    Pll here have this malfunction. They try to comprehend why someone want to try to do something, and not try to help on the problem.

    Anyway..

    I've been trying to make this work for one hour now. Still not working.

    This is what I put it together after all this testing:

    The launch script is:
    /Library/LaunchDaemons/com.openssh.sshd.plist

    This is the content of the launch script com.openssh.sshd.plist
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.openssh.sshd</string>
    <key>Program</key>
    <string>/usr/libexec/sshd-keygen-wrapper</string>
    <key>ProgramArguments</key>
    <array>
    <string>/usr/sbin/sshd</string>
    <string>-i</string>
    </array>
    <key>SessionCreate</key>
    <true/>
    <key>Sockets</key>
    <dict>
    <key>Listeners</key>
    <dict>
    <key>Bonjour</key>
    <array>
    <string>ssh</string>
    <string>sftp-ssh</string>
    </array>
    <key>SockServiceName</key>
    <string>ssh</string>
    </dict>
    </dict>
    <key>StandardErrorPath</key>
    <string>/dev/null</string>
    <key>inetdCompatibility</key>
    <dict>
    <key>Wait</key>
    <false/>
    </dict>
    </dict>
    </plist>
    You can unload the script with:
    /bin/launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist

    and no errors will pop. However, when you try to load the script with:
    /bin/launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist

    You get:
    socket(): Address family not supported by protocol family
    launch_msg(): Socket is not connected

    Now, the "socket(): Address family not supported by protocol family" error is usually related to IPv6. And if you edit the sshd_config and uncomment the line AddressFamily and set to any you will tell the system to accept IPv4 and IPv6 or if you set inet will set to IPv4.

    It did not worked! Also I don't know if the daemon is reading all parameters in this configuration file, because I changed the default port (22) to 3022 and did not worked. After a boot, the daemon was still on 22.

    However if I start the daemon manually by doing /usr/sbin/sshd the file will be read, and all parameters in the sshd_config will work. Plus the daemon comes back up. Restarting the daemon manually is not recognized by BossPrefs. It shows Off, I think because the service was not started by the launchctl.

    Weird thing about the launchctl and this service is that when you don't have OpenSSH installed and you install, the post install script can successfully load sshd. But after the thing is up and running, if you stop the service (either by kill or launchctl) you cannot load it again by using the same post install that worked when you first install Openssh. The post install script is located at:

    /private/var/lib/dpkg/info/openssh.postinst

    This is the content of the post install script.
    #!/bin/sh
    /bin/launchctl list com.openssh.sshd &>/dev/null ||
    /bin/launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist
    exit 0

    It would be nice to have a word from the devs about this.


    ******
    EDIT
    ******

    Ok I did some more testing. Here is what I tried now:

    To set inside the launch plist "-i -f /etc/ssh/sshd_config" so I could force sshd to read that config file, and have set inet inside to force
    IPv4. Did not work.

    Even trying load sshd directly from the term, but using -i did not work.

    -i is:

    Specifies that sshd is being run from inetd(8). sshd is normally not run from inetd
    because it needs to generate the server key before it can respond to the client, and
    this may take tens of seconds. Clients would have to wait too long if the key was
    regenerated every time. However, with small key sizes (e.g. 512) using sshd from
    inetd may be feasible.

    This is what happens when I /usr/sbin/sshd -i:

    ~ root# /usr/sbin/sshd -d -i
    SSH-2.0-OpenSSH_4.7

    Protocol mismatch.
    So thats it! Protocol mismatch.

    Accordingly with /etc/protocols the ssh (port 22) protocol is:
    xns-idp 22 XNS-IDP # Xerox NS IDP

    And sshd is suposed to accept both protocols: 1 and 2.

    But, by running in debug mode you can read:

    ~ root# /usr/sbin/sshd -d -f /etc/ssh/sshd_config
    debug1: sshd version OpenSSH_4.7p1
    debug1: private host key: #0 type 0 RSA1
    debug1: read PEM private key done: type RSA
    debug1: private host key: #1 type 1 RSA
    debug1: read PEM private key done: type DSA
    debug1: private host key: #2 type 2 DSA
    debug1: rexec_argv[0]='/usr/sbin/sshd'
    debug1: rexec_argv[1]='-d'
    debug1: rexec_argv[2]='-f'
    debug1: rexec_argv[3]='/etc/ssh/sshd_config'
    debug1: Bind to port 3022 on 0.0.0.0.
    Server listening on 0.0.0.0 port 3022.
    socket: Address family not supported by protocol family
    Same "socket: Address family not supported by protocol family"
    even tho it runs. Apparently inet doesn't run if ANY errors pop.

    But as I did running from the command line, the error pops, but sshd runs. It is running on 3022, because another sshd is already running on
    22, so 22 was already binded.


    My conclusion is that this is not a configuration problem. Something is missing. (Support for the protocol?) To bad launchctl doesn't have
    a failsafe debug parameter that allow us to run the service even after an error.

    A work around for this is to disable the launchctl plist, and create a .app/sh script that will run/kill the sshd, similar to the one we had
    back when 1.02 firm was around to turn on/off EDGE.

    But to do that we cannot use inet, and BossPrefs will no detect sshd (even when is running), because I think Bossprefs lists the launchctl
    (launchctl list) and display the info if is either on or off.

    Well, I'm sick of sshd. I'll do a script for myself, because an open sshd running all the time is a BIG security issue.
    Especially for people that doesn't change the mobile/root password.

    I use to screw around with my co-worker. I use to ssh into his phone, and change his phone db, all entries where like
    Mr John Penis, Mike Cock, Karen Vagina, and I use to change the pictures as well, with penis and vaginas pictures. Took him a week
    to figure that was ME! LMAO!!

    Well I have to work, bye.

    UnL0CkER
    Last edited by unl0cker; 08-14-2008 at 07:27 PM.

  9. #9
    Newbie Array

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

    Default issues with ssh as well

    same prob with poss pref but after emoving a few addon's working with ssh or that had any control to ssh even a power control enable/disable i got further this is where i am @ in terminal
    di5tances-MacBook:~ di5tance$ ssh root@192.168.1.102
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
    @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@
    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
    Someone could be eavesdropping on you right now (man-in-the-middle attack)!
    It is also possible that the RSA host key has just been changed.
    The fingerprint for the RSA key sent by the remote host is
    00:c7:b3:50:95:49:ac:b4:4f:11:a2:49:91:20:d9:88.
    Please contact your system administrator.
    Add correct host key in /Users/di5tance/.ssh/known_hosts to get rid of this message.
    Offending key in /Users/di5tance/.ssh/known_hosts:2
    RSA host key for 192.168.1.102 has changed and you have requested strict checking.
    Host key verification failed.
    di5tances-MacBook:~ di5tance$ ssh root@192.168.1.102


    any ideas
    thanks in advance

  10. #10
    Senior Professional Array unl0cker's Avatar

    Join Date
    Jul 2007
    Location
    In my Mind
    Posts
    128
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    14

    Default

    Yeah di5tance.

    Is just telling you that "the Host key"has changed. That can happen when: the ip-key changes,
    or when you suffering a mitm attack. I don't think the case here is an attack.

    So is quite simple. You need to either:

    Remove your know_hosts file

    rm ~/.ssh/known_hosts
    Or edit the known_hosts files and remove the IP related to the iphone, which is usually 192.168.x.x or 10.0.x.x or something like that

    nano -w ~/.ssh/known_hosts
    Remove the line, press CTRL + O and ENTER, to save the file, and CTRL + X to exit.


    Now ssh root@iphone_ip again, choose YES for the key verification.



    You show be in now.

    Let me know if doesn't work.

    ------------------------


    Now since programs like Transmit use the ~/.ssh/known_hosts file, sometimes you can also get some errors in Transmit and alikes, just use the method above, and should work again.


    Cheers,
    Last edited by unl0cker; 08-15-2008 at 02:57 AM.


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 02-08-2010, 04:59 PM
  2. How to install BossPrefs 2.12b
    By coadyj in forum iPhone 3G
    Replies: 0
    Last Post: 09-20-2008, 03:17 AM
  3. what're bossprefs
    By jamleezy in forum Free Toolchain Software (Cydia App's)
    Replies: 2
    Last Post: 03-26-2008, 01:39 AM
  4. Replies: 2
    Last Post: 09-18-2007, 09:34 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 09:20 AM.
twitter, follow us!