linux系统离线安装ssh服务源码安装(ubuntu)
linuxl离线安装ssh,源码安装ssh,无网Privilege separation user sshd does not exist
·
1.去ssh官网或者阿里源下载最新版本的源码
2.将压缩包上传到不能联网的服务器(想办法上传,解压tar包并进入
tar -zxvf 包名
cd 包名
3. 通过源码编译安装ssh
(1) ./configure --prefix=/opt --sysconfdir=/etc/ssh
#让配置文件在/etc/ssh下
(2)make
(3) make install
4. 出现问题
Privilege separation user sshd does not exist
解决办法:
在/etc/passwd 里面增加一行
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
在/etc/shadow 里加一行
sshd:!!:12506:0:99999:7:::
5. 然后重新编译安装,完成后使用ssh -V 查看版本
可以去/etc/ssh/sshd.config更改相关配置
6. 启动重启ssh服务
sudo /etc/init.d/ssh restart
sudo /etc/init.d/ssh start
sudo /etc/init.d/ssh.dpkg-new
sudo service sshd restart
以上命令哪个能用用哪个
更多推荐
已为社区贡献1条内容
所有评论(0)