我想cat ~/.ssh/id_rsa.pub | ssh root@host 'cat >> .ssh/authorized_keys'
在expect
. 使用spawn
command 执行命令时,
spawn cat ~/.ssh/id_rsa.pub | ssh root@host 'cat >> .ssh/authorized_keys'
它抛出错误消息,
cat |: No such file or directory
cat ssh: No such file or directory
...
我应该如何产生管道命令?