Can't SSH into iphone 2.1

Snoopy67

macrumors member
Original poster
Sep 14, 2008
43
0
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.
 

georgi0

macrumors regular
Aug 21, 2006
146
2
Cyberspace
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.
 

Starnamer

macrumors newbie
Jul 4, 2008
4
0
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.
 

Speedracer04

macrumors 6502a
Sep 8, 2006
617
0
Michigan
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
 

Snoopy67

macrumors member
Original poster
Sep 14, 2008
43
0
Thanks for your response.

Further investigation showed sshd wouldn;t start first because it couldn't find any host keys
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.

and second because port 22 was already in use (!).
How did you check that? I would like to check it, too.

no sshd process running
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?

P.S. Cydia installs the BSD Subsystem as part of it's installation.
Ah, thanks!

Regards,
Gabriel.

have you tried going through terminal on your macbook
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.
 

Starnamer

macrumors newbie
Jul 4, 2008
4
0
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...
 

Snoopy67

macrumors member
Original poster
Sep 14, 2008
43
0
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.
 

Hls811

macrumors 6502a
Apr 19, 2004
792
6
New Jersey
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.
 

Snoopy67

macrumors member
Original poster
Sep 14, 2008
43
0
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.
 

Snoopy67

macrumors member
Original poster
Sep 14, 2008
43
0
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.
 

Atholl

macrumors newbie
Sep 18, 2008
2
0
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.
 

Starnamer

macrumors newbie
Jul 4, 2008
4
0
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.
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.

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
I don't have a Mac. I use a program called PuTTY which talks SSH protocol.

Further investigation showed sshd wouldn;t start first because it couldn't find any host keys
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.
You may be right. I thought they were created as part of the install.

and second because port 22 was already in use (!).
How did you check that? I would like to check it, too.
Basically, when I ran SSHD in a terminal that's what it reported as the reason it wasn't going to start.

no sshd process running
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?
As mentioned elsewhere, inetd doesn't seem to run either.

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.
I have 'Air Sharing' and it still doesn't work. Might try the version from Installer.
 

bobbyhan

macrumors newbie
Sep 25, 2008
1
0
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
 

jtmarin

macrumors newbie
Oct 17, 2008
1
0
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!
 

arma47

macrumors newbie
Nov 29, 2007
1
0
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