SCP(安全复制)到EC2实例没有密码 [英] scp (secure copy) to ec2 instance without password

查看:193
本文介绍了SCP(安全复制)到EC2实例没有密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在运行(FreeBSD的9阿美阿美-8cce3fe5)的EC2实例,我可以ssh到它使用我的亚马逊创建的密钥文件,没有密码的提示,没有问题。

I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem.

不过,当我想使用scp我被要求输入密码才能将文件复制到该实例:

However, when I want to copy a file to the instance using scp I am asked to enter a password:

scp somefile.txt -i mykey.pem root@my.ec2.id.amazonaws.com:/

Password:

任何想法,为什么发生这种情况/怎么能说是prevented?

Any ideas why this is happening/how it can be prevented?

在此先感谢!

霍夫

推荐答案

想通了,有错误的顺序参数,这个工程:

figured it out, had the arguments in the wrong order, this works:

scp -i  mykey.pem somefile.txt root@my.ec2.id.amazonaws.com:/

这篇关于SCP(安全复制)到EC2实例没有密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆