Openssh service 启动报错

Openssh service 启动报错---处理方法记录

    • Openssh service 启动报错.处理方法记录2018.11.27

Openssh service 启动报错.处理方法记录2018.11.27

启动openssh-service报错如下
`"ssh.service - OpenBSD Secure Shell Server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code)  since 2017-01-04 15:56:11 CET; 19s ago
Process: 2701 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)
Main PID: 2701 (code=exited, status=255)

Jan 04 15:56:11 PM-server systemd[1]: Starting OpenBSD Secure Shell server...
Jan 04 15:56:11 PM-server systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Jan 04 15:56:11 PM-server systemd[1]: Failed to start OpenBSD Secure Shell server.
Jan 04 15:56:11 PM-server systemd[1]: ssh.service: Unit entered failed state.
Jan 04 15:56:11 PM-server systemd[1]: ssh. service: Failed with result "exit-code""`

##处理方法
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
##/usr/sbin/sshd -T 运行出错
Missing privilege separation directory: /var/run/sshd
##处理方法
mkdir /var/run/sshd



你可能感兴趣的:(Linux)