我设置为在两台没有密码的主机之间使用ssh。
ssh登录工作正常,但执行命令失败,并显示以下错误:
**isn't allowed to be executed with process or redirect controls.**
使用的简单命令:
ssh remo-tehost " echo \"\test\" >> \"/home/alarmstest.log\" "
我得到的运行跟踪:
debug1: Sending command: echo "test" >> "/home/alarmstest.log"
debug2: channel 0: request exec confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
debug2: channel 0: rcvd ext data 117
远程服务器上有用户使用的用户sudosh:x:500:500 :: / home / user:/ usr / local / bin / sudosh来自远程服务器的授权密钥+ -rw -------内部的密钥1位用户用户9092年12月13日07:53authorized_keys
由于对主目录的许可而导致的问题:
远程主机上的主目录〜,〜/ .ssh目录和〜/ .ssh / authorized_keys文件必须仅由使用700或755的用户可写,否则775将不起作用。
(本地主机上的)私钥文件仅可由使用的用户读取和写入:rw ——-,600。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句