Ssh question?

Discussion in 'Jailbreaks and iOS Hacks' started by jamesapp, Oct 16, 2009.

  1. jamesapp macrumors 6502a

    Joined:
    Mar 7, 2008
    #1
    Hello,
    I want to ssh into my iPhone, but I have a wifi problem. When I create an ad hoc network on my laptop and use it to connect to my phone, I get disconnected often. I went into settings and watched my wifi and like every 30 seconds or so I get disconnected? I am right in front of my computer? I had the same problem with a couple of other phones, I currently have a 3gs. My question is, is it safe to ssh with this problem? I just don't want to skrew anything up? But I would really like to ssh, I am fooling around with lockinfo and wanted to drop some files into my themes folder. Any help would be appreciated. One thing if I am using cyberduck on a mac does that use wifi or do you connect with USB? Haven't sshe'd in awhile that is why I ask.
     
  2. dZp macrumors 6502a

    dZp

    Joined:
    Mar 29, 2006
    #2
    Cyberduck (or any FTP client) works over WiFi, not USB.
    You could use iPhone Explorer over USB to put an end to your WiFi troubles. ;)
     
  3. amps macrumors member

    Joined:
    Jul 2, 2009
  4. ViViDboarder macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #4
    If it's because your phone is going asleep and turning off wifi, get Insomnia, but I doubt this is it because you said you watched it get disconnected, which makes me think it's still awake and you were looking at it. Also it happened with other phones.

    Here's what you do.

    When you SSH in the first thing you need to do is create a session that will persist if your connection drops.

    Log in and when you have the command prompt you want type
    Code:
    screen
    This will create a session that will stay running after you break your connection. If your connection drops, reconnect and type
    Code:
    screen -D -r
    And you will be right where you left off.

    This may not be on the iPhone and you may have to find it somewhere, but it's worth a try.

    screen is also useful if you want to run a lengthy command over ssh somewhere but don't want to stay connected. Or if you want mulitple command lines on one SSH session. You can do multiple screens. I've used it to burn DVD's using my iPhone remoted into my desktop. I created a screen, started it burning and detached. I came back later and reattached to the screen and saw it was done.

    More tutorials about screen are online.
     

Share This Page