iPhone ssh problem

After installing the BSD Subsystem and OpenSSH packages from the Installer.app, I tried to remotely login to my iPhone using ssh, but all I got was this error:

me@mbp $> ssh iphone
ssh_exchange_identification: Connection closed by remote host

After some googling I still couldn't find any useable solution to my problem, so I started to investigate the problem my self.

Running the Term-vt100.app on the iPhone and typing /usr/sbin/sshd -t reviled that the host keys was not generated, so the fix was to generate them by hand:

me@iphone $> ssh-keygen -t rsa1 -b 1024 -f /etc/ssh_host_key -N ''
me@iphone $> /usr/bin/ssh-keygen -d -f /etc/ssh_host_dsa_key -N ''
me@iphone $> /usr/bin/ssh-keygen -t rsa -f /etc/ssh_host_rsa_key -N ''

After that it all work like a charm.

from:http://www.my-place.biz/page0/files/1dc330112cc73308affb6d1d52b4b0a1-7.html

Categories

,
| | 评论(0)

发表评论

August 2012

      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

关于此日记

此日记由 Cnangel 发表于 February 24, 2010 9:25 AM

此Blog上的上一篇日记这段日子真的很忙

此Blog上的下一篇日记linux下screen的内存问题

首页归档页可以看到最新的日记和所有日记。

归档

Powered by Movable Type 5.14-en