1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > aws linux使用ssh登陆_在Mac上通过ssh连接到amazon aws linux服务器

aws linux使用ssh登陆_在Mac上通过ssh连接到amazon aws linux服务器

时间:2024-08-16 07:37:48

相关推荐

aws linux使用ssh登陆_在Mac上通过ssh连接到amazon aws linux服务器

有人问在Mac的一个简单的方法来创build〜/ .ssh文件夹将通过运行命令ssh-keygen,然后使用以下设置…

一个。

macbook-air$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/Users/sam/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/sam/.ssh/id_rsa. Your public key has been saved in /Users/sam/.ssh/id_rsa.pub.

B.然后创build:

touch ~/.ssh/authorized_keys

C.修复权限:

chmod 600 ~/.ssh/authorized_keys

D.将AWS Key复制到该文件:

cp AWS_key.text ~sam/.ssh/authorized_keys

#在创buildEC2实例时,您应该先保存此SSH密钥

E.然后testingssh到AWS Linux服务器 – 你会看到这个错误:

ssh -i ./authorized_keys root@ec2-54-76-176-29.ap-southeast-2.

请以用户“ec2-user”而不是用户“root”的身份login。

F.重新尝试一下,它应该与允许的AWS用户“ec2-user”一起工作:

ssh -i ./authorized_keys ec2-user@ec2-54-76-176-29.ap-southeast-2. __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| /amazon-linux-ami/.09-release-notes/ 9 package(s) needed for security, out of 12 available Run "sudo yum update" to apply all updates.

希望这有所帮助,一切顺利。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。