Can't SSH into iphone 2.1

Discussion in 'iPhone Tips, Help and Troubleshooting' started by Snoopy67, Sep 16, 2008.

  1. Snoopy67 macrumors member

    Joined:
    Sep 14, 2008
    #1
    Could some kind soul please help me with this problem?
    I can't ssh into my iphone 2G, which I recently upgraded to 2.1 (using pwnagetool).

    According to Cydia, I've got OpenSSH installed on my iphone.
    (I also have Terminal, and many others).

    I do
    ssh root@ip-ad
    where ip-adr is the IP-adress that my iphone display in Settings -> Wi-Fi -> my network.
    So, obviouly, my iphone is connected via Wi-Fi to the local WLAN, my macbook is connected via Ethernet to the LAN.

    However, nothing happens, it doesn't ask for a password, and eventually I get a timeout.

    A lot of guides talk about installing the BSD Subsystem.
    Unfortunately, I can't find them, neither in Installer, nor in Cydia.

    Any help, hints, or suggestions will be highly appreciated.

    Regards,
    Gabriel.

    PS:
    If there is any other forum that would be better suited for this kind of question, please let me know.
     
  2. georgi0 macrumors regular

    georgi0

    Joined:
    Aug 21, 2006
    Location:
    Cyberspace
    #2
    I wonder if you can do that??
    Do you have it jailbroken somehow and flashed it to 2.1 firmware?? I can only asume so since you mention installer and etc..


    I really want to access SSH in my upgraded 2.1 phone but not jailbroken one, somehow.
     
  3. Starnamer macrumors newbie

    Joined:
    Jul 4, 2008
    #3
    Can't SSH into iPod touch either - no solution yet.

    I've also found I can't SSH into my iPod Touch after upgrading to 2.1. Further investigation showed sshd wouldn;t start first because it couldn't find any host keys and second because port 22 was already in use (!). Tried reinstalling, no change. Also tried specifying a different port and that didn't work either.

    Haven't test fully, but also found that OpenSSH on an iPhone 3G didn't have any host keys and no sshd process running (although BossPrefs said it should be started).

    Will post back here if I find anything further.

    P.S. Cydia installs the BSD Subsystem as part of it's installation.
     
  4. Speedracer04 macrumors 6502a

    Speedracer04

    Joined:
    Sep 8, 2006
    Location:
    Michigan
    #4
    have you tried going through terminal on your macbook and not just on your phone?

    ssh root@ip-ad

    have you tried using cyberduck?

    hmm ya i dunno
     
  5. Snoopy67 thread starter macrumors member

    Joined:
    Sep 14, 2008
    #5
    Thanks for your response.

    I thought ssh and sshd create those keys on first login.
    At least, that's what ssh does when I log in to other machines.

    How did you check that? I would like to check it, too.

    I thought that's what inetd is for: it starts the appropriate daemon when a connection request comes in, and the appropriate daemon is listed in /etc/services.
    Isn't it?

    Ah, thanks!

    Regards,
    Gabriel.

    What else? I open terminal and type this

    > ssh root@ip-ad


    I suppose, if ssh doesn't work, then cyberduck won't work either, or?

    Regards,
    Gabriel.
     
  6. Starnamer macrumors newbie

    Joined:
    Jul 4, 2008
    #6
    Iphone Tunnel Suite works ...

    After trying SSH over WiFi, I tried using the iPhone Tunnel Suite (SSH over USB). Strangely this worked, and once it had started the sshd process I could also SSH over WiFI...

    You might want to try that method ... http://www.makkiaweb.net/itunnel/

    Obviously further investigation is needed...
     
  7. Snoopy67 thread starter macrumors member

    Joined:
    Sep 14, 2008
    #7
    I have just noticed that inetd is not running on my iphone!

    Cydia claims that the package inetutils is installed ... shouldn't that also turn on inetd?

    I can start /usr/libexec/inetd manually from the mobileterminal, which seems to work fine (i.e., when I 'ps -axw | grep inetd' it actually shows up).

    Still, when I try to ssh into my iphone, I get "Operation timed out" ;-(

    Could it be that I'm not running inetd as root, but as 'mobile'?
    (Because when i start terminal, i am logged in as user 'mobile')

    G.
     
  8. Hls811 macrumors 6502a

    Hls811

    Joined:
    Apr 19, 2004
    Location:
    New Jersey
    #8
    I'm having a similiar problem.. I initially installed OpenSSH through Installer and was able to SSH fine.. I installed it Through installer out of habit but since that was the only thing I had from there I decided to un-install it and then re-install through Cydia... Once i re-installed through Cydia it stopped working.

    I haven't gone back to try and re-install the installer version, I might give it a go tonight.
     
  9. Snoopy67 thread starter macrumors member

    Joined:
    Sep 14, 2008
    #9
    Which FW version do you have?
     
  10. Snoopy67 thread starter macrumors member

    Joined:
    Sep 14, 2008
    #10
    I think, I found a work-around!

    On the Mac:

    Go to System Preferences -> Network -> Airport -> Network Name -> Create network

    Create a network there with whatever name you want (you might want to set a password, though ;-) ).

    On the iPhone:

    Go to Settings -> Wi-Fi, select the new network, which should show up there.

    Then, tap on the blue arrow on the right of that network name and note the IP adress.

    Viola: you can now 'ssh root@ip_adr' or 'ssh mobile@ip_adr' from your Mac.

    The reason, why it doesn't work the other, "normal" way, must have something to do with my macbook being connected to the office LAN via ethernet, while my iphone is connected to the office WLAN via wi-fi ...

    Another funny thing is that the password for 'root' and 'mobile' are exactly the same on my iphone ... but i don't dare set them to something else ...

    HTH,
    Gabriel.
     
  11. Snoopy67 thread starter macrumors member

    Joined:
    Sep 14, 2008
    #11
    What the ...

    Now I can ssh into my iphone even via the "normal" route that didn't work at all in the past few days! ...
    ("normal route" = macbook - ethernet - several routers in-between - Wi-fi - iphone)

    I have no idea ... I haven't changed anything.
    I even rebooted the phone to make sure it persists -- i can still ssh.

    Maybe it has something to do with my installing 'Air Sharing' on the iphone (extremely cool app).
    But inetd is still not running, and sshd is running only while i'm logged in remotely.

    Puzzled,
    G.
     
  12. Atholl macrumors newbie

    Joined:
    Sep 18, 2008
    #12
    I had the same problem. I'm not completely sure this is what fixed it, but I started up MobileTerminal and ssh'd out from the iPhone to another server and from that point on I was able to ssh into the iphone.
     
  13. Starnamer macrumors newbie

    Joined:
    Jul 4, 2008
    #13
    SSH does not exist on an un-jailbroken iPhone (or iPod) so you can't connect to one.

    In fact, SSH doesn't exist on a lot of jailbroken iPhones since it's an optional install.

    Basically, all jailbreaking does is install a method of installing other apps. As a side effect, Cydia adds a lot of items ported from *nix, but SSH isn't one of them.

    I don't have a Mac. I use a program called PuTTY which talks SSH protocol.

    You may be right. I thought they were created as part of the install.

    Basically, when I ran SSHD in a terminal that's what it reported as the reason it wasn't going to start.

    As mentioned elsewhere, inetd doesn't seem to run either.

    I have 'Air Sharing' and it still doesn't work. Might try the version from Installer.
     
  14. bobbyhan macrumors newbie

    Joined:
    Sep 25, 2008
    #14
    WINSCP keyboard interactive authentication

    Hi,
    I have installed winscp, iphone tunnel suite, open ssh (on iphone). Everytime I click on tunnel suite 2.7, it ask for keyboard interactive authentication, with necessary input for password and domain. What do I key for pw?alpine?Domain?
    Please help.
    Have not been able to SSH since day 1. Now using iphone v2.1

    Thnak you
     
  15. jtmarin macrumors newbie

    Joined:
    Oct 17, 2008
    #15
    SSH ok!

    Hello there. Don't know whether you solve the problem or not, but...

    It's working ok. Just install the WSCP (windows), the OpenSSH (Cydia) and turn it on the SSH with BossPrefs.
    Then, open the WSCP and try with:
    IP: (bossprefs will show it) something like 192.168.xxx.xxx
    log: root
    pass: alpine

    If this doesn't work (error message), turn off your phone (full off with the slider) and wait 10 secs. Then turn it on and try again. It's working fine for me.

    cheers!
     
  16. arma47 macrumors newbie

    Joined:
    Nov 29, 2007
    #16
    Port 22

    Make sure your port is set to : 22 , so PORT : 22,
    i added that and i was able to use that with filezilla
     

Share This Page