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

Monthly Archives

Pages

Powered by Movable Type 7.7.2

About this Entry

This page contains a single entry by Cnangel published on February 24, 2010 9:25 AM.

这段日子真的很忙 was the previous entry in this blog.

linux下screen的内存问题 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.