2016年11月8日 星期二

Linux CentOS 7 SSH Connection Refused after Reboot

Description
On CentOS 7, I am using SSH fine for a month. After doing some operation with "systemctl status/mask/disable/restart firewalld" followed by "sudo reboot -h now", I cannot use ssh and got "connection refused" after reboot.

Problem
ssh 127.0.0.1
connection refused

Log
journalctl -u sshd | tail -100
Bad configuration option:ForwardX11Trusted
ssh failed

Solution
Comment "ForwardX11Trusted" option in sshd_config file as follows.
sudo vi /etc/ssh/sshd_config
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
#ForwardX11Trusted yes

Outcome
journalctl -u sshd | tail -100
-- Logs begin at Tue 2016-11-08 17:45:28 HKT, end at Tue 2016-11-08 17:49:45 HKT. --
Nov 08 17:45:47 pc009 systemd[1]: Started OpenSSH server daemon.
Nov 08 17:45:47 pc009 systemd[1]: Starting OpenSSH server daemon...
Nov 08 17:45:47 pc009 sshd[1033]: Server listening on 0.0.0.0 port 22.
Nov 08 17:45:47 pc009 sshd[1033]: Server listening on :: port 22.
Nov 08 17:45:54 pc009 sshd[2296]: Accepted password for user from 10.1.10.111 port 59915 ssh2

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...