Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
对于管理员,Scp在一个方向失败,但对于root用户成功_Scp - Fatal编程技术网

对于管理员,Scp在一个方向失败,但对于root用户成功

对于管理员,Scp在一个方向失败,但对于root用户成功,scp,Scp,我可以使用admin从服务器a向另一个服务器B执行scp,但同一个管理员无法将文件从服务器B发送回服务器a。我使用了scp-vv,详细信息如下所示: 管理员在某些情况下可以不使用scp文件吗?如果是,我如何检查先验知识 Executing: program /usr/local/bin/ssh host 140.199.280.888, user adm, command scp -v -t /home/adm/test OpenSSH_4.3p2, OpenSSL 0.9.8e 23 Feb

我可以使用admin从服务器a向另一个服务器B执行scp,但同一个管理员无法将文件从服务器B发送回服务器a。我使用了scp-vv,详细信息如下所示:

管理员在某些情况下可以不使用scp文件吗?如果是,我如何检查先验知识

Executing: program /usr/local/bin/ssh host 140.199.280.888, user adm, command scp -v -t /home/adm/test
OpenSSH_4.3p2, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to 140.199.280.888 [140.199.280.888 port 22.
debug1: Connection established.
debug1: identity file /home/pro/.ssh/identity type -1
debug1: identity file /home/pro/.ssh/id_rsa type -1
debug1: identity file /home/pro/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '140.199.280.888' is known and matches the RSA host key.
debug1: Found key in /home/prov/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/pro/.ssh/identity
debug1: Trying private key: /home/pro/.ssh/id_rsa
debug1: Trying private key: /home/pro/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
adm@140.199.280.888's password: 
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending command: scp -v -t /home/adm/test
Setting up release specific environment variables...
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug2: fd 6 setting O_NONBLOCK
debug2: fd 7 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending command: scp -v -t /home/adm/test/
debug2: channel 0: request exec confirm 0
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Setting up release specific environment variables...
debug2: channel 0: read<=0 rfd 6 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
adm@pro% debug2: channel 0: write failed
debug2: channel 0: close_write
debug2: channel 0: output open -> closed
debug2: channel 0: rcvd eof
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.3 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 0
执行:程序/usr/local/bin/ssh主机140.199.280.888,用户adm,命令scp-v-t/home/adm/test
OpenSSH_4.3p2,OpenSSL 0.9.8e 2007年2月23日
debug1:正在读取配置数据/usr/local/etc/ssh\u config
debug1:连接到140.199.280.888[140.199.280.888端口22。
debug1:已建立连接。
debug1:identity file/home/pro/.ssh/identity-type-1
debug1:identity file/home/pro/.ssh/id\u rsa type-1
debug1:identity file/home/pro/.ssh/id_dsa type-1
debug1:远程协议版本1.99,远程软件版本OpenSSH_4.3
debug1:match:OpenSSH_4.3 pat OpenSSH*
debug1:启用协议2.0的兼容模式
debug1:本地版本字符串SSH-2.0-OpenSSH_4.3
debug1:SSH2\u MSG\u KEXINIT已发送
debug1:SSH2\u MSG\u KEXINIT已收到
debug1:kex:server->client aes128 cbc hmac-md5无
debug1:kex:client->server aes128 cbc hmac-md5无

debug1:SSH2_MSG_KEX_DH_GEX_请求(1024这看起来像是一个已知的问题。bashrc和scp(从bash和非交互式shell的excacly输出)。我通过修改.bashrc的部分以仅为交互式shell执行来解决这个问题

case $- in
*i*)    # interactive shell
alias cc='clearCache.sh'

echo 'Alias:
cc       - clear cache
;;
esac
与这些问题的联系: