標籤:style blog http color width 檔案
command-line: line 0: Bad configuration option: PermitLocalCommand2011-12-08 14:04:54標籤:Bad configuration option PermitLocalCommand 職場 休閑
廢話少說,問題描述與解決
今天在一server上傳輸檔案時,遇到scp error
[[email protected] ~]# scp aa.txt [email protected]:/home/software/
command-line: line 0: Bad configuration option: PermitLocalCommand
lost connection
剛發現此問題時,還以為是sshd服務問題,將sshd重啟後,問題依舊,查了些資料,說是sshd的設定檔問題,從其它server上拷貝檔案,重啟sshd服務,問題依舊,糾結。。。
之後將openssh的clients包重安裝下,報如下錯誤:
[[email protected] software]# rpm -ivh openssh-clients-4.3p2-29.el5.x86_64.rpm
Preparing... ########################################### [100%]
1:openssh-clients ########################################### [100%]
error: unpacking of archive failed on file /usr/bin/ssh: cpio: rename failed - 不允許的操作
由此可見是/usr/bin/ssh出現異常
此時,查看/usr/bin/ssh的詳細資料,當看到許可權和屬性時,發現
[[email protected] bin]# lsattr ssh
-u--ia------- ssh
此時看到這個屬性,心中就有疑問了,於是找了其他server上的ssh程式許可權和屬性看了一下,。
[[email protected] ~]# lsattr /usr/bin/ssh
------------- /usr/bin/ssh
於是將01server上的ssh屬性將uia去掉,命令:
chattr -uia /usr/bin/ssh
再重啟sshd服務,問題即可解決!