Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 8, 2010, 12:59 PM   #26
coolthing76
macrumors newbie
 
Join Date: Jan 2010
Same Results

yezza

Same thing here.


1. Tried connecting via SSH - no go (connection closed by remote host).

2. Re-installed openSSH. Did not reboot.

3. Successfully connected via SSH.

4. (Skipped) Did an iTunes sync.

5. (Skipped)Successfully reconnected via SSH.

6. Rebooted phone.

7. Unsuccessful attempt to connect via SSH (connection closed by remote host).


Anyways, my goal is to do this:
http://aikhan.wordpress.com/2009/06/...ions-on-linux/

I can live with reinstalling OpenSSH every time i reboot my iPhone which I rarely do

This took some time already any ideas from anyone is welcome for sure.

Thank you everyone
coolthing76 is offline   0 Reply With Quote
Old Feb 8, 2010, 04:40 PM   #27
mappyman
macrumors regular
 
Join Date: Jul 2008
Location: UK
Delete the ".ssh" directory if you have one in roots home directory.

drwxr-xr-x 2 root sys 68 Sep 26 07:04 empty

Also does the above directory have the same permission as mine, its located in /var
mappyman is offline   0 Reply With Quote
Old Feb 8, 2010, 07:07 PM   #28
foob
macrumors 6502
 
Join Date: Feb 2009
Can you ssh in as mobile instead of root? Can you ssh from the phone to the pc using MobileTerminal?
foob is offline   0 Reply With Quote
Old Feb 8, 2010, 08:08 PM   #29
MrThompsonR
macrumors 6502
 
Join Date: Dec 2009
Quote:
Originally Posted by dhlizard View Post
Also, your IP address can change from day to day. Make sure the one you are using is still correct.
Depending on your router/ DHCP settings your ip address will change every few minutes... Just verify the "current" assigned ip address before trying to connect to your phone... and make sure you turn off the "auto lock."
MrThompsonR is offline   0 Reply With Quote
Old Feb 9, 2010, 03:46 AM   #30
yezza
macrumors regular
 
Join Date: Mar 2008
Quote:
Originally Posted by foob View Post
Can you ssh in as mobile instead of root? Can you ssh from the phone to the pc using MobileTerminal?
ssh from mobile terminal gives me "connection refused".

ssh mobile@192.168.... gives me the same result as root:

"connection closed by remote host"
yezza is offline   0 Reply With Quote
Old Mar 10, 2010, 01:23 PM   #31
sanctifi3d
macrumors newbie
 
Join Date: Mar 2010
I have the very same problem I've been trying to fix it for ovewr a week now cant seem to get it to work any suggestions? I restored a couple of times and none fixed it
sanctifi3d is offline   0 Reply With Quote
Old Mar 10, 2010, 02:17 PM   #32
NCUSA
macrumors newbie
 
Join Date: Mar 2010
Why don't you try with USB way to connect your iPhone..

I'm using iFunBox and it works great, it's like WinSCp so you don't need to worry..
Here is the video that's going to help you: http://www.youtube.com/watch?v=mNBZ-D8uEBM
NCUSA is offline   0 Reply With Quote
Old Apr 16, 2010, 10:46 PM   #33
baoshi
macrumors newbie
 
Join Date: Nov 2009
Hi Guys,
I found this thread when I'm googling the same problem.
My observation is that each time I cannot ssh to iPhone, the reason is /usb/sbin/sshd gets deleted
FYI I'm running OS 3.1.2 and iTunes 9.1

Last edited by baoshi; Apr 16, 2010 at 10:53 PM.
baoshi is offline   0 Reply With Quote
Old Apr 17, 2010, 06:27 AM   #34
yezza
macrumors regular
 
Join Date: Mar 2008
Quote:
Originally Posted by baoshi View Post
Hi Guys,
I found this thread when I'm googling the same problem.
My observation is that each time I cannot ssh to iPhone, the reason is /usb/sbin/sshd gets deleted
FYI I'm running OS 3.1.2 and iTunes 9.1
Hello baoshi,

Yes you're right (good spotting), I have the same thing happening.

I am on 3.1.2 and iTunes 9.1 also, but I have had this problem whilst on iTunes 9.0 too. I'm still hoping for a solution.
yezza is offline   0 Reply With Quote
Old May 4, 2010, 01:32 PM   #35
bbhepa
macrumors newbie
 
Join Date: May 2010
I have the exactly same problem here, and have been trying to solve it for over a week now.

I guess baoshi found the source of our headache.

Messages such as "ssh_exchange_identification: Connection closed by remote host" is very very misleading; the "ssh_exchange_identification" only tells us where the ssh client was executing when "Connection closed by remote host" happened. The connection close is an asynchronous event and it is not related to "ssh_exchange_identification" in any logical way.

What's happening here is that the server side (the iphone) accepts and establish a connection from the ssh client by means of the inetd process, and the inetd simply shutting down the connection because the actual server program, the sshd, that should serve this connection does not exist.

In addition to the /usr/sbin/sshd, I noticed /usr/libexec/sshd-keygen-wrapper is spontaneously removed also.

The next problem is

"Who the heck is removing these files, and why?"
bbhepa is offline   0 Reply With Quote
Old May 5, 2010, 10:04 AM   #36
bbhepa
macrumors newbie
 
Join Date: May 2010
Folks, the problem is solved, at least those caused by spontaneously disappearing /usr/sbin/sshd. It is done by the worm type malware called "ikee" or something like it.

Google it in the web, or refer to pages like:

http://forums.justcommodores.com.au/...-worm-fix.html

In my case, I usually change password asap, but it seems like it hit me within the split second time rag.

My personal thoughts about this incident is that the openssh package should be installed as disabled, then enabled at users command.

Good luck to those having the same problem.
bbhepa is offline   0 Reply With Quote
Old May 6, 2010, 05:12 AM   #37
yezza
macrumors regular
 
Join Date: Mar 2008
Talking Awesome

Quote:
Originally Posted by bbhepa View Post
Folks, the problem is solved, at least those caused by spontaneously disappearing /usr/sbin/sshd. It is done by the worm type malware called "ikee" or something like it.

Google it in the web, or refer to pages like:

http://forums.justcommodores.com.au/...-worm-fix.html

In my case, I usually change password asap, but it seems like it hit me within the split second time rag.

My personal thoughts about this incident is that the openssh package should be installed as disabled, then enabled at users command.

Good luck to those having the same problem.
Thanks bbhepa, that seems to have fixed my problem

I was under the impression that my wallpaper would change to Rick Astley if I had the worm (and my wallpaper had not changed), but gave the removal process a whirl anyway.
yezza is offline   0 Reply With Quote
Old Nov 20, 2010, 04:09 AM   #38
rocteur
macrumors newbie
 
Join Date: Nov 2010
Quote:
Originally Posted by NathanA View Post
I would try uninstalling OpenSSH one more time (and then reboot, NOT respring, afterward), but after it is removed, use something like iPhoneBrowser to see if there is an /private/etc/ssh directory. If there is, delete EVERYTHING in it as well as the directory itself. After that, reinstall OpenSSH and try one more time to make a connection.

The first time you attempt to make a connection after doing this, it may take longer than normal as it will need to generate a new set of RSA keys from scratch for itself again. Subsequent connections should be fast.

... Deleted ...

-- Nathan
This worked for me! Thanks Nathan but I also had to follow these instructions:

http://forums.justcommodores.com.au/...-worm-fix.html

/usr/sbin/sshd disappeared

Last edited by rocteur; Nov 20, 2010 at 06:23 AM. Reason: Need to add a point !
rocteur is offline   0 Reply With Quote
Old May 29, 2011, 11:53 AM   #39
yink
macrumors newbie
 
Join Date: May 2011
Thanks!

Hi all, I spent the whole day trying to figure this out. After reinstalling openssh, I would be able to ssh into my own phone by running
ssh localhost

However, after a while, ssh localhost would fail and I would get the dreaded
ssh_exchange_identification: Connection closed by remote host

Turns out that my iPhone is infected with the ikee worm as you guys pointed out. Not too sure how that happened especially cos I did a fresh iOS 4.3.3 install the day before (at home) and changed my default passwords soon after. I also checked Pwnage Tool's SHA-1 to ensure I used a legit version to bake the custom ipsw file for my iPhone.

My family has 3 other iOS devices. The 3 other devices have all been jailbroken at some point but they are not currently jailbroken. Doing fresh OS installs and not jailbreaking subsequently probably means they don't have the worm right? I don't think I got infected from my home network.

I think the biggest suspect is installing stuff from Cydia, which I did a ton of after jailbreaking. Let me check up on this and see if I can come up with anything.

Also, thanks for all the tips!
yink is offline   0 Reply With Quote
Old May 30, 2011, 12:47 AM   #40
beej69
macrumors newbie
 
Join Date: Nov 2003
iPhone malware

yikes!

my first encounter with iPhone malware that's what i get for installing openssh before changing the default "alpine" password for users mobile and root i'm so glad i stumbled across this thread!

IMNSHO, the most important thing is to nuke /System/Library/LaunchDaemons/com.ikey.bbot.plist

an easy way to do this is to use iPhone Explorer from http://www.macroplant.com/iphoneexplorer/

if you don't see this file, you're suffering from some other problem. nuking the other files mentioned here and elsewhere is just cleanup. the above file is the one that makes the malware load every time your iphone boots.

if you're feeling paranoid, restore and be careful to change your default passwords before installing openssh next time

good luck!
marc
beej69 is offline   0 Reply With Quote

Reply
MacRumors Forums > iPhone, iPod and iPad > iOS > Jailbreaks and iOS Hacks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Airplay finally works 100% of the time with iOS 5 and the iPhone 4 jim2011 iPhone 8 Jan 2, 2012 06:42 PM
So...is Speech to Text in Beta? It Only Works 50% of the Time for Me VideoNewbie iOS 5 and earlier 23 Nov 7, 2011 12:39 PM
turning off imac screen: only works 10% of the time sepandee iMac 5 Sep 17, 2009 09:10 AM
MBA 1.86GHz/128SSD Rev. B Fan at 6200RPM 99% of the time hellfire88 MacBook Air 14 Jul 30, 2009 11:08 AM
Yahoo Push! Email working MOST of the time...troubleshoot tips? wfiphone iPhone Tips, Help and Troubleshooting 3 Jun 14, 2009 04:36 PM


All times are GMT -5. The time now is 11:11 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC