1.首先裝上putty,然後用putty的puttygen來generate用戶的鑰匙,在完成後Save private key.通常是xxx.ppk.
2.接下來就是在EC2裡create user,.ssh folder還有authorized_keys
# sudo su (if needed)
# useradd user
# cd /home/user
# mkdir .ssh
# chmod 700 .ssh
# chown user:user .ssh
# vim .ssh/authorized_keys (把藍色部分裡的keys填上)
# chmod 600 .ssh/authorized_keys
# chown user:user .ssh/authorized_keys
3. 然後在putty或winscp裡就能login了,不要忘記在Auth裡帶上xxx.ppk,不然不能進.
沒有留言:
張貼留言