1. Thank you for visiting our community! Our free registration takes a matter of seconds. You'll enjoy a completely ad-free experience, have access to posting and our iPhone downloads. REGISTER TODAY!
  2. Avatar Theme Week starts today and we're kicking it off with Star Trek. We want you to get your Trek on. Read more and learn how to update your photo here at eiC/iPopuli. Taking part means you could be randomly selected to win an awesome app, so join the fun.

How to SSH into your iPhone

Discussion in 'iPhone Jailbreak' started by emx620, Feb 21, 2008.

  1. emx620 New Member

    Member Since:
    Jul 13, 2007
    Message Count:
    113
    Ratings Received:
    +0 / 0
    Sorry if this has been posted before but I keep getting asked. First off to enable SSH on your phone do this:
    • SSH is a service that you can install and run on the iPhone that allows you to access the phone's files / folders from your PC or Mac
    • You need to install BSD Subsystem and OpenSSH (in that order) from under the System category in Installer in order to be able to use it
    Putty is downloaded here:
    http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

    Make sure your iPhone is connected to your network. To find your IP address, go to Settings -> Wi-Fi
    Click the blue arrow on the network you are connected to. Your IP address will be in there. Use that number for the rest of this guide.

    Cygwin Instructions:
    ssh root@xxx.xxx.x.xxx Put your IP address here.
    For me it was:
    ssh root@10.4.9.40
    It will prompt for a password which will be alpine.

    Putty Instructions:
    In the Putty configuration window under Host Name - put your ip address here
    Click Open.
    Click Yes if prompted.
    Put root as the login and alpine as the password.

    WinSCP Instructions:
    After connecting to your iPhone, do the following:
    Commands -> Open Terminal
    Click Ok if prompted. After typing in each command click Execute.

    CyberDuck
    Click New Connection.
    In the Protocol dropwdown menu, choose SSH.
    In the Server field, input your iPhone's IP.
    In the Username field, enter root.
    In the Password field, enter alpine, unless you have changed it.
    Click Connect.
    --- Thanks John ---

    Term-VT100
    "Install http://www.trejan.com/irepo/ source in Installer. Then install "SUID Lib Fix" and "Term-vt100 SUID fix" from the Tweaks 1.1.3 cstegory."
    Once you run this fix you will still be prompted for a password when launching term but it will now accept "alpine" and allow you in.
    --- Thanks Griffinaz and Tinman---

    Hope this helps. Let me know if you have any questions.
  2. Lincoln New Member

    Member Since:
    Aug 11, 2007
    Message Count:
    6,809
    Ratings Received:
    +4 / 0
    Nice guide; I get asked this question very frequently.

    However, if I'm not mistaken, all your listed programs are Windows programs. Inlcude Cyberduck for the Mac. The instructions are as follows:

    In Cyberduck, click New Connection.
    In the Protocol dropwdown menu, choose SSH.
    In the Server field, input your iPhone's IP.
    In the Username field, input root.
    In the Password field, input alpine, unless you have changed it.
    Click Connect.

    - John
  3. Hawk Genius

    Member Since:
    Aug 2, 2007
    Message Count:
    7,200
    Ratings Received:
    +274 / 0
    anyone have some instructions for Term VT100?
    Everytime I go into it, it asks for a password right off the bat, and alpine apparently is not it.
    After it fails for the first time I enter everything like it's listed for Cygwin:
    ssh root@your ip address here
    It will ask for a password which will be alpine.
  4. Lincoln New Member

    Member Since:
    Aug 11, 2007
    Message Count:
    6,809
    Ratings Received:
    +4 / 0
    I have the same issue. I always get incorrect login and incorrect password.

    - John
  5. emx620 New Member

    Member Since:
    Jul 13, 2007
    Message Count:
    113
    Ratings Received:
    +0 / 0
    Are you specifying the user name? Maybe its trying to use some other default user name the iPhone doesn't have?
  6. justahsquirrel Member

    Member Since:
    Jun 7, 2007
    Message Count:
    596
    Ratings Received:
    +0 / 0
    are you on 1.1.3? cause if you are, there is a few fixes you need to install to get vt100 working properly.
  7. Hawk Genius

    Member Since:
    Aug 2, 2007
    Message Count:
    7,200
    Ratings Received:
    +274 / 0
    I don't actually know. I've been instructed to input ssh root@ipaddress and then hit enter and then enter alpine for the password. Never works.
    But it does just ask for a password when I first start the app.
  8. justahsquirrel Member

    Member Since:
    Jun 7, 2007
    Message Count:
    596
    Ratings Received:
    +0 / 0
    to ssh into the phone, make sure you have openssh installed in the iphone.

    and bsdsubsystems..which is the first to get installed.

    launch which ever scp client you have. I'm on a PC using winscp.

    host name :root@192.168.x.xxx...what ever your ipaddress is on your iphone
    user name: root
    pw: alpine
    file protocol :scp

    as far as vt100 with 1.1.3 you need to do a few fixes before you get it to work
    1. install services
    2. install services.app SUID fix
    3. install SUID lib fix
    4.bsd sub system 2.0 termfix.

    when you launch vt100 hit enter
    login: root
    pw: alpine, it will not type out with ***** so just keep typing.

    good luck.

    ps. make sure the phone and the computer you are using is on the same network or else your gonna hit a brick wall!
  9. Griffinaz Zealot

    Member Since:
    Oct 5, 2007
    Message Count:
    1,107
    Ratings Received:
    +0 / 0
    To get Term-VT100 to permit you to login, follow these steps (Thanks to Tinman for posting these in a different thread):

    "Install http://www.trejan.com/irepo/ source in Installer. Then install "SUID Lib Fix" and "Term-vt100 SUID fix" from the Tweaks 1.1.3 cstegory."

    Once you run this fix you will still be prompted for a password when launching term but it will now accept "alpine" and allow you in.
  10. timothy Member

    Member Since:
    Nov 4, 2007
    Message Count:
    189
    Ratings Received:
    +0 / 0
    ok. This worked for me in this order:
    1. install BSD
    2. install openSSH
    3. install VT100
    4. (I'm 1.1.4 I know) install the VT100 fix (despite it saying for 1.1.3 only
    5. [PC] install WinSCP
    6. following the above persons login info -
    host name :root@192.168.x.xxx...what ever your ipaddress is on your iphone (located in settings/wifi)
    user name: root
    pw: alpine
    file protocol :scp
    7. don't connect yet.
    8. type in VT100 "ssh" (obviously without the quotes)
    9. while iphone is opening that, use winSCP to connect.
    10. in my case, wait 5 seconds, get a window that looks like WSftp and many other ftp programs
    11. do happy dance

    Hope this helps!
  11. timothy Member

    Member Since:
    Nov 4, 2007
    Message Count:
    189
    Ratings Received:
    +0 / 0
    12. open itunes and make .m4r ring tones.
    13. copy them all over to the ringtones directory and they show up under standard Not custom :D
  12. OhWhyMe New Member

    Member Since:
    Jan 17, 2008
    Message Count:
    52
    Ratings Received:
    +0 / 0
    How do you turn openssh off? Hit unload -w? Then hit Load -w when you want to turn it on?
    What does regular load do?
  13. emx620 New Member

    Member Since:
    Jul 13, 2007
    Message Count:
    113
    Ratings Received:
    +0 / 0
    Uninstall it I guess or install a Services app and do it through that.
  14. OhWhyMe New Member

    Member Since:
    Jan 17, 2008
    Message Count:
    52
    Ratings Received:
    +0 / 0
    Thanks! I actually installed bossprefs and that has an option to turn off ssh
  15. Lincoln New Member

    Member Since:
    Aug 11, 2007
    Message Count:
    6,809
    Ratings Received:
    +4 / 0
    Turning SSH off is a good idea when you aren't using it, as it eats up battery like crazy.

    - John
  16. reddyshetty New Member

    Member Since:
    Mar 17, 2008
    Message Count:
    1
    Ratings Received:
    +0 / 0
    Problem SSHing to IPhone.

    Hi I am having SSHing to my Iphone. It says unable to connect. Do you have anyother steps to continue or troubleshoot the situation?

    - Hemanth
    :frown:
  17. Ramesh Zealot

    Member Since:
    Jul 12, 2007
    Message Count:
    4,860
    Ratings Received:
    +3 / 0
    Really? I've noticed no difference in battery drain. None at all, and I've run jailbroken and jailed for extended times. No diff on my end.
  18. rennyn New Member

    Member Since:
    Feb 1, 2008
    Message Count:
    100
    Ratings Received:
    +0 / 0
    Just noticed this guide. Nice work!
  19. michael180 Zealot

    Member Since:
    Jun 14, 2007
    Message Count:
    1,354
    Ratings Received:
    +2 / 0
    I am trying to ssh into my phone via terminal.

    I did as you suggested above, but I keep getting the error, "RSA host key for my IP ADDR has changed and you have requested strict checking.
    Host key verification failed.

    Now I know my IP ADDR is correct.

    Any suggestions?
  20. emx620 New Member

    Member Since:
    Jul 13, 2007
    Message Count:
    113
    Ratings Received:
    +0 / 0
    Did you read Timothy's post at the bottom of the first page of this thread?

Share This Page