i.MX6 Openssh移植及测试——转帖
导读:移植Openssh到i.MX6平台,这样就可以多人同时远程登录i.MX6平台,提高平台的利用率。使用硬件MY-I.MX6 Demo开发平台使用软件linux Mfgtools 串口软件正文参考资源:http://www.nenew.net/openssh-port-arm9-board.htmlhttp://www.2cto.com/os/201302/188376.html相同的内容就不贴了,下面主要记录不一致的地方。编译时指定的路径:zlib./configure --prefix=/home/bruce/share/work/WiFi/openssh/install/zlibmakemake installopenssl./Configure --prefix=/home/bruce/share/work/WiFi/openssh/install/openssl os/compiler:arm-linux-gccmakemake installopenssh./configure --host=arm-linux --prefix=/usr/local/openssh --with-zlib=/home/bruce/share/work/WiFi/openssh/install/zlib --with-ssl-dir=/home/bruce/share/work/WiFi/openssh/install/openssl --disable-etc-default-login --disable-strip CC=arm-linux-gcc AR=arm-linux-armake这里不需要install,直接将生成的文件拷贝到开发板的文件系统中。注意事项在开发板中操作cd /usr/local/openssh/etcssh-keygen -t rsa1 -f ssh_host_key -N ""ssh-keygen -t rsa -f ssh_host_rsa_key -N ""ssh-keygen -t dsa -f ssh_host_dsa_key -N ""ssh-keygen -t ecdsa -f ssh_host_ecdsa_key -N "" //原文中这里写错了另外,把这个文件/usr/local/openssh/etc/ sshd_config 中的PermitRootLogin yes前的注释“#”号去掉。方便我们使用root账号远程登录。我们系统中使用的是busybox构建的根文件系统,有些文件不合乎标准。/etc/passwd,该文件要特别关注,因为OpenSSH(SSHD)对用户管理校验要求很严,所以Busybox添加的用户基本是不符合要求的,主要表现为密码失效等,要手动修改,示例如下:使用Busybox添加用户时,/etc/shadow文件大概形式如下:# cat /etc/shadowroot:$1$m.jegaqA$vA.rBTVryyUAcRvyZ2gOL1:0:0:99999:7:::telnetd:$1$N4uZUEcU$yotoDExxgGXs6PE7PQuIR1:0:0:99999:7:::honey:$1$SwtHyL/h$MsEX6Vnqz/qhwDsivDqD20:0:0:99999:7:::sshd:$1$elylgRon$FOHgkwpPMcNI5s.iL8ZS/.:0:0:99999:7:::这样的话,使用SSH登录就会出现用户登录失败,提示诸如“WARNING: Your password has expired. You must change your password now and login again!”等等。需要手工修改,大致如下:# cat /etc/shadowroot:$1$m.jegaqA$vA.rBTVryyUAcRvyZ2gOL1:15695:5:99999:7:5:20000:telnetd:$1$N4uZUEcU$yotoDExxgGXs6PE7PQuIR1:15695:5:99999:7:5:20000:honey:$1$SwtHyL/h$MsEX6Vnqz/qhwDsivDqD20:15695:5:99999:7:5:20000:sshd:$1$elylgRon$FOHgkwpPMcNI5s.iL8ZS/.:15695:5:99999:7:5:20000:设置root用户密码passwd root输入密码即可开启/sbin/sshd服务后使用SecureCRT工具即可登录。当前开发板上电后手动启动无线网络cd /home/bruce/wifi运行start启动脚本,这个脚本中会装载无线网卡驱动,并且自动连接实验室的TP-604路由器。注意,这里使用了固定IP:192.168.1.179,这个IP地址不能和无线网络中的其他IP地址冲突。如果需要可以修改start脚本。./start然后启动sshd服务/sbin/sshd这时就可以通过ssh工具远程连接开发板了。账号:root密码:Viny123456789附:使用SecureCRT工具进行连接远程连接的方法打开SecureCRT,选择SSH2连接。http://www.eeboard.com/wp-content/uploads/2014/08/iMX6-Openssh%E7%A7%BB%E6%A4%8D%E5%8F%8A%E6%B5%8B%E8%AF%951-500x327.jpg下一步,输入IP地址和密码http://www.eeboard.com/wp-content/uploads/2014/08/iMX6-Openssh%E7%A7%BB%E6%A4%8D%E5%8F%8A%E6%B5%8B%E8%AF%952-500x331.jpgNext后直接Finish在左边的Sessions中双击选择刚才新建的名称,打开后会弹出输入密码的对话框,输入密码,点击OK即可进入开发板shell命令提示行。http://www.eeboard.com/wp-content/uploads/2014/08/iMX6-Openssh%E7%A7%BB%E6%A4%8D%E5%8F%8A%E6%B5%8B%E8%AF%953-500x293.jpghttp://www.eeboard.com/wp-content/uploads/2014/08/iMX6-Openssh%E7%A7%BB%E6%A4%8D%E5%8F%8A%E6%B5%8B%E8%AF%954-500x86.jpg例子:使用top命令查看系统当前状态http://www.eeboard.com/wp-content/uploads/2014/08/iMX6-Openssh%E7%A7%BB%E6%A4%8D%E5%8F%8A%E6%B5%8B%E8%AF%956-468x500.jpg使用注意事项由于是我们内部人用来作嵌入式开发,我们这里使用了root账号。root账号拥有系统全部权限,使用时不要删除系统中其他文件。最好的方法是在/home目录下建立自己的用户名目录,然后切换到此目录,测试程序都可以放在这个目录下。这样大家同时使用,但又不相互影响。ˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉ作者 bruce helen原文地址:http://www.eeboard.com/tutorials/i-mx6-openssh_test/
O(∩_∩)O~ sdlibin007 发表于 2014-8-28 09:32
O(∩_∩)O~
这是什么表情?
现在用i.MX6的应该也多了 cn_x 发表于 2014-8-28 09:38
这是什么表情?
现在用i.MX6的应该也多了
着实不懂这个啊!1 还是辛苦拉 楼主辛苦 谢谢分享{:lol:} 谢谢分享了~~~ 收藏!LZ分享的资料果然很给力。 这个值得一看的~~ 可以,这个还是蛮实用的
页:
[1]