【发布时间】:2013-12-19 14:49:30
【问题描述】:
我正在将脚本重定向到日志
test.sh >> 我的日志
test.sh 有
spawn scp -o stricthostkeychecking=no /root/.ssh/id_rsa.pub
root@$IP:/root/.ssh/authorized_keys
我正在获取日志
spawn scp -o stricthostkeychecking=no /root/.ssh/id_rsa.pub root@IP:/root/.ssh/authorized_keys^M
Warning: Permanently added 'IP' (RSA) to the list of known hosts.^M^M
root@10.112.75.21's password: ^M
^Mid_rsa.pub 0% 0 0.0KB/s --:-- ETA^Mid_rsa.pub 100% 405 0.4KB/s 00:00 ^M
Host key verification failed.^M
Host key verification failed.^M
将 Control-M 添加到我的日志的原因是什么?重定向时我做错了什么吗?
谢谢你
PS:我所有的系统都是基于unix的系统
【问题讨论】:
-
我不可能是唯一一个想知道“spawn”命令来自哪里的人。