买的iphone 3G手机默认没有启动sshd,启动该服务基本走了如下步骤:
1. 执行 /usr/sbin/sshd 提示libcrypto 找不见,后来发现时openssl没有安装,安装openssl后,该提示消失
2. 执行 /usr/sbin/sshd 提示 ssh_host_rsa_key ssh_host_dsa_key 没有,使用ssh-keygen 生成就行了:
# ssh-keygen -t rsa1 -f /usr/local/etc/ssh_host_key -N ""
Generating public/private rsa1 key pair.
Your identification has been saved in /usr/local/etc/ssh_host_key.
Your public key has been saved in /usr/local/etc/ssh_host_key.pub.
The key fingerprint is:
5c:30:b9:cc:45:b6:fd:c3:c1:e1:a2:cc:7c:0f:3c:29
#ssh-keygen -t dsa -f /usr/local/etc/ssh_host_dsa_key -N ""
Generating public/private dsa key pair.
ification has been saved in /usr/local/etc/ssh_host_dsa_key.
Your public key has been saved in /usr/local/etc/ssh_host_dsa_key.pub.
The key fingerprint is:
30:ce:d9:c1:61:36:40:0b:9e:04:6f:89:96:f1:e7:39 root@v420
#ssh-keygen -t rsa -f /usr/local/etc/ssh_host_rsa_key -N ""
Generating public/private rsa key pair.
Your identification has been saved in /usr/local/etc/ssh_host_rsa_key.
Your public key has been saved in /usr/local/etc/ssh_host_rsa_key.pub.
The key fingerprint is:
37:34:88:98:b3:8c:1b:50:e0:50:9c:3d:18:c6:64:2a
3. 生成key后,启动sshd、远程连接成功