Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2647264
  • 博文数量: 416
  • 博客积分: 10220
  • 博客等级: 上将
  • 技术积分: 4193
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-15 09:47
文章分类

全部博文(416)

文章存档

2022年(1)

2021年(1)

2020年(1)

2019年(5)

2018年(7)

2017年(6)

2016年(7)

2015年(11)

2014年(1)

2012年(5)

2011年(7)

2010年(35)

2009年(64)

2008年(48)

2007年(177)

2006年(40)

我的朋友

分类: 嵌入式

2015-08-11 10:13:17

参考文档:
http://blog.csdn.net/sno_guo/article/details/15995663

环境:
Ubuntu15 + TQ210开发板 + linux + sshd
经常要上传、下载数据,安装sshd使用比较方便

说明交叉编译环境问题,先前通过apt-get install 安装arm-linux交叉编译环境,会出再现glibc PC版本与开发板上版本不一致问题,
需要将光盘下:Linux平台工具\4.4.6_TQ210_release_20120720.tar.bz2安装上,参考其文档
编译过程与参考文档差不多,将Makefile中的gcc, ar改成对应的

mkdir -p /usr/local/bin/ 
mkdir -p /usr/local/sbin/ 
mkdir -p /usr/local/etc/ 
mkdir -p /usr/local/libexec/ 
mkdir -p /var/run/ 
mkdir -p /var/empty/
chmod 755 /var/empty/

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 ""
ssh-keygen -t rsa1 -f ssh_host_key -N ""

运行sshd出现下面问题:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/usr/local/etc/ssh_host_key' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /usr/local/etc/ssh_host_key
Could not load host key: /usr/local/etc/ssh_host_key

解决办法:
将sshd帐号加入passwd,然后
chown -R sshd /usr/local/etc/*
chmod 777 /usr/local/etc/*

阅读(1275) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~