使用scp命令, 报 scp: .: not a regular file的解决办法

[root@192 keepalived]# scp keepalived.conf root@192.168.229.50: /etc/keepalived/
cp: "keepalived.conf" 与"/etc/keepalived/keepalived.conf" 为同一文件
root@192.168.229.50's password: 
scp: .: not a regular file

 检查多次,觉得命令没有错误,尝试远程复制到别的主机上,依旧出现此问题,无法复制

最后发现,IP地址后面的:不要加空格,直接跟上要复制的目录即可,哭。。。

[root@192 keepalived]# scp keepalived.conf 192.168.229.50:/etc/keepalived/
root@192.168.229.50's password: 
keepalived.conf                                                                                          100% 1175     2.2MB/s   00

posted on 2021-09-18 08:32  笑洋仟  阅读(793)  评论(0编辑  收藏  举报

levels of contents