[英]How to give access to the Client on SFTP server for s3 bucket accessing using key pair on AWS?
我们想通过基于公钥认证的AWS SFTP服务器来访问客户端访问AWS上的s3存储桶,如何基于公钥认证访问客户端,我们将遵循哪些步骤?
If you are using AWS Transfer for SFTP , then you should:如果您使用AWS Transfer for SFTP ,那么您应该:
The user should then be able to connect to the server by using their private key.然后用户应该能够使用他们的私钥连接到服务器。
I think you'll also need to create an IAM Role that grants the user access to the appropriate S3 bucket.我认为您还需要创建一个 IAM 角色,授予用户访问相应 S3 存储桶的权限。 See: Working with service-managed users - AWS Transfer Family
请参阅: 与服务托管用户合作 - AWS Transfer 系列
I created the key pair using ssh-keygen, then these two keys are store in same folder.我使用 ssh-keygen 创建了密钥对,然后这两个密钥存储在同一个文件夹中。 following script is passed then file is automatically transferred to cliet folder
传递以下脚本,然后文件会自动传输到 cliet 文件夹
echo " Privatekey,PublicKey (copied)"
chmod 600 $folder/id_rsa
# private key permission changed
filechmod_result=`echo $?`
if [[ $filechmod_result -eq 0 ]];
then
echo "chmod is success 12345678"
else
echo "chmod is fail"
fi
sftp -o Port=8022 -o IdentityFile=$folder/id_rsa -o StrictHostKeyChecking=no $username@$servername << !
cd client folder
put $folder/$client folder
ls
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.