Bad configuration option localCommand

來源:互聯網
上載者:User

標籤: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服務,問題即可解決!

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.