英文:
Load file into AWS server using scp
问题
I'm trying to copy a file from a local Mac directory to a Linux AWS server using SCP, and I keep getting the error: "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)" when I run the following command?
scp -i /path/to/kp/keypair.pem /Documents/to/upload/tourmaline.zip ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com:/home/ec2-user/
(We copied the public DNS part from the instance)
When we run SSH with /path/to/kp/keypair.pem to ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com, it works, but not with SCP. Any suggestions?
I'm expecting to get the file loaded onto the Linux AWS server; we tried messing with different paths and flags.
英文:
I'm trying to copy a file from a local mac directory to a Linux aws server using scp and i keep getting the error: Permission denied (publickey,gssapi-keyex,gssapi-with-mic when I run the following command?
scp -i /path/to/kp/keypair.pem /Documents/to/upload/tourmaline.zip ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com:/home/ec2-user/
(the amazonaws part we copied the public dns from the instance)
when we run ssh /path/to/kp/keypair.pem ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com it works, but not with scp, and suggestions?
I'm expecting to get the file loaded onto the linux aws servier, we tried messing with different paths and flags
答案1
得分: 1
看起来你的 scp
命令缺少用户信息,你应该在 ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com
前面加上 ec2-user@
:
scp -i /path/to/kp/keypair.pem /Documents/to/upload/tourmaline.zip \
ec2-user@ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com:/home/ec2-user/
英文:
Looks like your scp
command is missing the user, you should prepend ec2-user@
to ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com
:
scp -i /path/to/kp/keypair.pem /Documents/to/upload/tourmaline.zip \
ec2-user@ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com:/home/ec2-user/
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论