centos ll 命令提示Input/output error

在內網一臺服務器上面操作,忽然敲打一個ll命令提示Input/output error 

Lspwd常用命令都報這個錯;

ssh -v [email protected]

OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017

debug1: Reading configuration data /home/common/.ssh/config

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 58: Applying options for *

debug1: Connecting to 192.168.1.236 [192.168.1.236] port 22.

debug1: Connection established.

debug1: identity file /home/common/.ssh/id_rsa type 1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_rsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_dsa type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_dsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_ecdsa type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_ecdsa-cert type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_ed25519 type -1

debug1: key_load_public: No such file or directory

debug1: identity file /home/common/.ssh/id_ed25519-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_7.4

ssh_exchange_identification: read: Connection reset by peer

 

提示ssh_exchange_identification: read: Connection reset by peer

df –h命令也報錯不能用,reboot都報錯,只好到服務器那邊瞧瞧,dell屏顯提示提示E1810 Hard Drive 2 fault Review&clear SEL,第二塊硬盤黃燈閃着確實不正常,第一反應完蛋硬盤掛了,記得這個機器做過raid,內網機器不怕數據丟失問題,直接熱插拔一下黃燈硬盤,觀察一會,似乎狀態正常了,似乎有一線生機還能用。

接顯示器一看屏幕都是i/o error block x026160一堆錯誤,重啓了服務器希望服務器還有救,重啓以後服務器找不到系統了提示:strike F1 to retry boot.F2 for system startup  F11 for bios manager.杯具;dell 熱插拔硬盤是可以自動創建raid的,再看看硬盤指示燈是正常的,至少現在不用換硬盤,按着提示進bios一陣操作沒效果,依舊找不到系統,在萬能的網絡幫助下最後只能BIOS初始化了,在開機看到delll圖標時候按着F2進入BIOS,然後把鍵盤三個鍵 大寫鎖(cap lock),數碼鎖定(Num lock),滾動鎖定(Scrolock)都點亮,然後依次按着 ALT+E,ALT+F,ALT+B,按完ALT+B以後機器自動重啓,即恢復了BIOS的操作;

重啓以後熟悉的centos系統又出現了。

 

 

Psssh_exchange_identification: read: Connection reset by peer報錯:

可能密碼錯誤過多被服務器拒絕拉黑了,

Vim /etchosts.allow

註釋掉,添加:sshdALL

重啓sshd應該可以了;

 

重啓服務器,rebootinit不能用時候,執行:

 

1.執行:
echo 1 > /proc/sys/kernel/sysrq
"magic SysRq key"
提供了一個通過/proc來直接給內核發送命令的方法。要啓用該特性,只需在內核編譯的時候啓用"CONFIG_MAGIC_SYSRQ"這個選項,而一般發行版的標準內核都已經啓用了。激活這個選項。


2.
需要重啓的時候,只需要執行
echo b > /proc/sysrq-trigger
設備馬上重啓。

 

 

有時候Read from remote host 192.168.1.236: Connection reset by peer Connection to 192.168.1.236 closed.  服務器能ping通,端口也通就是上不去:

1.ssh文件權限太大:cd /var/empty

chmod -R 755 * 

2. 如果ssh client 窗口在幾分鐘內沒有鍵盤操作的時候 會話就會超時斷線,通過修改sshd的配置文件 能夠讓ssh server 發送心跳信號來維持持續鏈接,;

Vim /etc/ssh/sshd_config

最後添加一行 
ClientAliveInterval 60
指定了服務器端向客戶端請求消息的時間間隔, 默認是0, 不發送.ClientAliveInterval 60表示每分鐘發送一次, 然後客戶端響應, 這樣就保持長連接了 
ClientAliveCountMax 1 
表示服務器發送請求後,客戶端沒有響應的次數達到了一定的值,就會自動斷開。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章