command-line: line 0: Bad configuration option: PermitLocalCommand

2011-12-08 14:04:54

废话少说,问题描述与解决

今天在一server上传输文件时,遇到scp error

[root@server01 ~]# scp aa.txt  root@192.168.0.1:/home/software/

command-line: line 0: Bad configuration option: PermitLocalCommand

lost connection

刚发现此问题时,还以为是sshd服务问题,将sshd重启后,问题依旧,查了些资料,说是sshd的配置文件问题,从其它server上拷贝文件,重启sshd服务,问题依旧,纠结。。。

之后将openssh的clients包重安装下,报如下错误:

[root@server228 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的详细信息,当看到权限和属性时,发现

[root@server01 bin]# lsattr ssh

-u--ia------- ssh

此时看到这个属性,心中就有疑问了,于是找了其他server上的ssh程序权限和属性看了一下,。

[root@server46 ~]# lsattr /usr/bin/ssh

------------- /usr/bin/ssh

于是将01server上的ssh属性将uia去掉,命令:

chattr -uia /usr/bin/ssh

再重启sshd服务,问题即可解决!

Bad configuration option localCommand的更多相关文章

  1. PECL: configuration option "php_ini" is not set to php.ini location

    message similar to: configuration option "php_ini" is not set to php.ini locationYou shoul ...

  2. ssh: Bad configuration option: usedns

    某天突然听到同事说服务器上git用不了了,上去一看,确实用不了了,git pull报出了如下错误: $ git pull /etc/: Bad configuration option: usedns ...

  3. clr enabled Server Configuration Option

    在SQL Server中启用CLR,可以执行下面SQL语句: EXEC sp_configure 'clr enabled'; '; RECONFIGURE; Source Code

  4. Elasticsearch Configuration 中文版

    ##################### Elasticsearch Configuration Example ##################### # This file contains ...

  5. P6 EPPM Installation and Configuration Guide 16 R1 April 2016

    P6 EPPM Installation and Configuration Guide 16 R1         April 2016 Contents About Installing and ...

  6. P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1

    P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1       May ...

  7. Laravel Configuration

    Introduction All of the configuration files for the Laravel framework are stored in the app/config d ...

  8. [转] Spring - Java Based Configuration

    PS: Spring boot注解,Configuration是生成一个config对象,@Bean指定对应的函数返回的是Bean对象,相当于XML定义,ConfigurationProperties ...

  9. odoo view field option, action flage 参数

    options JSON object specifying configuration option for the field's widget (including default widget ...

随机推荐

  1. builder-设计模式

    package com.wp.java.builder; import org.junit.Test; public class DoDoContactDemo { @Test public void ...

  2. 【风马一族_Java】如何获取ACSLL表的值

    消耗两小时,只为一代码. 终于得到了此代码: public class sows { public static void main(String[] args) { byte[] bytes = n ...

  3. 数列平方根的和 java

    题目描述: 数列的定义如下:数列的第一项为n,以后各项为前一项的平方根,求数列的前m项的和. 输入 输入数据有多组,每组占一行,由两个整数n(n<10000)和m(m<1000)组成,n和 ...

  4. ▲教你如何轻易的做linux计划任务▲——小菜一碟

    一次性计划任务的安排: at :安排作业在某一时刻执行一次(一般都是用它) batch:安排作业在系统负载不重时执行一次 第一步: #service atd start  开启一次性计划任务   at ...

  5. Java应用短信猫

    首先确定短信猫正常连接到主机,并安装SIM卡.先用超级终端测试短息猫能不能用.安装minicom:#sudo apt-get install minicom安装完成后,执行#sudo minicom ...

  6. c++const小结

    C++const简单整理,本文的首次是在博客园发布的,如有错误,欢迎大家指正 博客园链接:http://www.cnblogs.com/Forever-Kenlen-Ja/p/3776991.html ...

  7. 可以支持jQuery1.10.1 的 fancybox 1.3.4, 並現在type為Ajax時,也可以定義窗口的大小。

    官網上的 fancybox 1.3.4 太老了,不支持jQuery1.10.1,改動了一下源碼,現在可以支持了. type為Ajax時,也可以定義窗口的大小. $("#ajaxlink&qu ...

  8. 如何在CentOS5中增加CentALT的源

    1. 建立centalt.repo    指令: vi /etc/yum.repos.d/centalt.repo 2. 將下面的內容貼進去    [CentALT]    name=CentALT ...

  9. php中json_encode中文编码问题分析

    众所周知使用json_encode可以方便快捷地将对象进行json编码,但是如果对象的属性中存在着中文,问题也就随之而来了.json_encode会将中文转换为unicode编码例如:'胥'经过jso ...

  10. js读取json数据(php传值给js)

    <?php $array =array('fds','fdsa','fdsafasd');  // json_encode($array); ?> <html> <hea ...