Results 1 to 20 of 20

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: Can't use SFTP on my iPhone

  1. #1
    Default Can't use SFTP on my iPhone
    I installed the installer app and used that to install SSH.
    I got SFTP working yesterday, but then it stopped working.
    I restored my phone and then reinstalled installer and ssh and now i can't get SFTP to work again. The error message says "the sftp connection to '10.0.1.3' could not be opened because the connection to the sftp server could not be established or was lost."

    any help?
    Last edited by vivalanation734; 2007-08-21 at 07:32 PM.

  2. #2
    Can you ssh to the phone and log in successfully?

  3. #3
    Green Apple
    Join Date
    Aug 2007
    Location
    you'll know when I know
    Posts
    78
    Thanks
    6
    Thanked 5 Times in 3 Posts

    go to your home folder and find the ".ssh" folder (invisible-see below) and find the "known_hosts" file. clean that file out (i deleted everything) and save it using text editor (don't "save as", just "save) and try FuGu again. It should work now.

    the .ssh folder is invisible. I used a free program called "invisibles" that I got from versiontracker.com to show my invisibles and find the folder.

    hope this helps. Worked great for me.

    Jeff

  4. #4
    the same thing happened to me while trying to istall iswitcher. when i ssh to my iphone, terminal says "ssh_exchange_identification: Connection closed by remote host"

  5. #5
    clean out the know_hosts file on both ends.
    then try to reconnect and let it generate a new RSA key
    Best Regards

  6. #6
    iPhone? More like MyPhone mrrippey's Avatar
    Join Date
    Jul 2007
    Location
    NJ
    Posts
    137
    Thanks
    8
    Thanked 9 Times in 8 Posts

    Quote Originally Posted by pengcm View Post
    clean out the know_hosts file on both ends.
    then try to reconnect and let it generate a new RSA key
    How can you clean out the iPhone directory if you cannot connect to it? I tried to use iFuntastic but could not find anything. My terminal is now now working (after uninstall and re-install) although at least i can now see it in Bonjour so I know SSH/SFTP is running.

    Tried to connect using Terminal and Fugo

    Any help would be appreciated. Is there a iPhone browser for Apple?

    Rippey

  7. #7
    Quote Originally Posted by mrrippey View Post
    How can you clean out the iPhone directory if you cannot connect to it? I tried to use iFuntastic but could not find anything. My terminal is now now working (after uninstall and re-install) although at least i can now see it in Bonjour so I know SSH/SFTP is running.

    Tried to connect using Terminal and Fugo

    Any help would be appreciated. Is there a iPhone browser for Apple?

    Rippey
    I don't trust iFuntastic with these stuff very much, so I wouldn't use that as the baseline for a comparison.

    try to clean out the known_hosts file on the computer end first, and then try to connect to ur iPhone. If that fails, then use the terminal app on ur iPhone and clean out the known_hosts file. If that fails, try to stop and restart the SSH service on ur iPhone via built in terminal, then try to connect again. If that fails too, uninstall terminal, openSSH, and the sub BSD system from ur iPhone, shut down ur phone. After a restart, try to install those back, then try to connect again.

    Also, try to use the terminal app on ur iPhone to connect to ur computer, see if that works. (# ssh [email protected]) This might help u figure out which end has the problem.

    try these, it's highly likely ur problem will be solved with these steps.
    Best Regards

  8. The Following User Says Thank You to pengcm For This Useful Post:

    mrrippey (2007-09-17)

  9. #8
    You can also us the finder.app to even delete the known_host file. All this can be downloaded using installer.app.

    - Garrett

  10. The Following User Says Thank You to garretwp For This Useful Post:

    mrrippey (2007-09-17)

  11. #9
    iPhone? More like MyPhone mrrippey's Avatar
    Join Date
    Jul 2007
    Location
    NJ
    Posts
    137
    Thanks
    8
    Thanked 9 Times in 8 Posts

    Thanks guys, I think I am much closer now. I get a prompt for password using Fugo. Now the root password I thought was dottie, well that isnt working

    Can it be something else? Please tell me it does not lock the account as I tried it a few times.

    I do have terminal working again on the iPhone, if i need to delete known_hosts from the iPhone, where is it located?

    Thanks again!

    Rippey

  12. #10
    Quote Originally Posted by mrrippey View Post
    Thanks guys, I think I am much closer now. I get a prompt for password using Fugo. Now the root password I thought was dottie, well that isnt working

    Can it be something else? Please tell me it does not lock the account as I tried it a few times.

    I do have terminal working again on the iPhone, if i need to delete known_hosts from the iPhone, where is it located?

    Thanks again!

    Rippey
    /private/var/root/.ssh/ (same place for both ur mac and ur iphone)
    Unfortunately u cannot use Fugu to delete the file, as it cannot see the file.
    notice the '.' in front of the 'ssh', that makes it hidden from plain view.
    now, we can do this via the mac's built-in terminal application.
    Follow these steps (from ur mac):
    1. press CMD + Space to initiate spotlight
    2. type in terminal, then click on it when the hits come up from spotlight
    3. type ssh [email protected]
    4. enter 'dottie' as the password (don't forget the 'e' at the end!!)
    5. once connected, u will see a '#', that's the root command prompt
    [6 ~ 8 can be skipped, but serves as tutorial purpose]
    6. type 'ls', u should only see Library and Media (.ssh is hidden!!)
    7. type 'ls -a', u should now see '.ssh' as well as other '.'prefixes
    8. type 'ls -la', u should now see all the files in detail
    (the files with a 'd' on the leftmost end indicates a directory)
    9. type 'cd .ssh' to enter the directory
    10. type 'ls', u should see the known_hosts file
    11. type 'rm known_hosts' to remove the file
    12. press ctrl+d to close the connection
    Now we are done, repeat the same exact steps on ur mac as well!
    depending on where u left off on ur mac, u could be in some directory other than your home directory. To get back to ur home directory from anywhere in the system, type 'cd ~'. (The '~' indicates ur home dir)

    One more thing, before u delete a file, make sure it's the one u want.
    There's no way to recover that file once it's been rm'd.
    And please don't play around while u r logged in as root, u can destroy the entire filesystem in a single command .. irrecoverable .. of course ..

    Good luck .. and may this a first step for u towards exploring the file system in detail (Detail == Command line).

    As far as u said that 'dottie' isn't the correct password, I find it hard to believe, since it's unlikely u changed it. Has anyone else played with it??

    Gimme some feedback on how this goes ... cheer =)
    Best Regards

  13. #11
    Quote Originally Posted by rajfantastic View Post
    the same thing happened to me while trying to istall iswitcher. when i ssh to my iphone, terminal says "ssh_exchange_identification: Connection closed by remote host"
    go back and jailbreak your iphone. Same issue i had, for some reason the iphone went back to jail. The ssh should work then.

  14. #12
    iPhone? More like MyPhone mrrippey's Avatar
    Join Date
    Jul 2007
    Location
    NJ
    Posts
    137
    Thanks
    8
    Thanked 9 Times in 8 Posts

    Thanks guys, I will try both approaches tonight (return to jail and deleting hosts on iPhone).

    I will let you both know

    Thanks

    Rippey

  15. #13
    Default Try this
    I had the same problem with SSH for an hour. I got it working by setting the http proxy from off to auto...At least I think thats what did it. My ip address changed and I got it working. Good luck.

  16. #14
    Quote Originally Posted by MrNoSox View Post
    go to your home folder and find the ".ssh" folder (invisible-see below) and find the "known_hosts" file. clean that file out (i deleted everything) and save it using text editor (don't "save as", just "save) and try FuGu again. It should work now.

    the .ssh folder is invisible. I used a free program called "invisibles" that I got from versiontracker.com to show my invisibles and find the folder.

    hope this helps. Worked great for me.

    Jeff
    That is unnecessary if you know the .folder you are looking for.
    In the menu bar of the finder click on Go > Go to Folder... or just use Shift+Command+G.

  17. #15
    Okay, how about using Cyberduck or another Mac-based FTP program? I had more success with Cyberduck than FUGU for some unknown reason. Give it a try......

  18. #16
    i had the same ssh_exchange_identification error,
    I just reinstalled the BSD Subsystem from Installer.app, deinstalled OpenSSH and reinstalled it again and its Working...!

  19. #17
    i was able to copy n drag files to my iphone using fugu on my 1st attempt.
    subsequently, i got this message "ssh_exchange_identification: Connection closed by remote host" .
    i have read abt e previous entries n suggestions given by various n tried most of them out... i understand that many others have experienced e same problem. the luckier ones are able to solve it thru trial n error. i have tried uninstalling openSSh , BBD on my iphone but stil no success.. ifuntastic can only copy files to e home folder. i wan to copy mario theme to summerboard n more NES games !! someone help pls
    or is there another prog on mac OS that transfers files as efficiently as SFTP prog? thanks in advance

  20. #18
    2 questions
    1) I can't connect to iPhone using terminal, but i can connect it through putty from my PC & cyberduck. Thus, the unlock process stopped at "Pre 1.1.1 upgrade" in iNdependance 1.2.5

    2) How to do if I did remove the known_hosts file from my Mac?

  21. #19
    terminal FTW...

    ccomein

    open .ssh in the terminal window then press the Return key. This opens the .ssh folder which contains the file known_hosts.
    .
    Drag known_hosts into the trash then close the .ssh folder.
    Deleting know_hosts removes all host keys from your computer so all hosts will be treated as though you are connecting to them for the first time.

    iwaniphone

    open fugu go to fugu/prefernces/known host

    delete the known host and save...

    problem solved
    Last edited by mkurasz; 2007-11-03 at 06:01 AM. Reason: Automerged Doublepost

  22. #20
    Had same problem - SSH was working only shortly after reinstal...
    folowed this:
    iPhone ikee worm "Fix"

    Actualy only /bin/poc-bbot was found and deleted

    everything was done by using iFiles

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •