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
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