How to Setup and Secure Linux SSH Logins to use Private PEM Keys
来源:互联网 发布:工业怪兽 知乎 编辑:程序博客网 时间:2024/04/30 15:12
from:http://www.curvve.com/blog/guides/2013/how-to-create-multiple-amazon-ec2-keypair-logins-for-contractors-and-employees/
SSH logins are susceptible to brute force attacks. A thousand things can go wrong which could give someone unauthorized access to your server. The best way to secure your SSH login is to use Public/Private PEM keys. This is default login type for Amazon EC2 servers. Unfortunately Amazon’s interface only created a single account. This tutorial will show you how to setup additional PEM keys for other users.
Once you’ve logged into your server, do the following:
Step 1: New Account setup
Here we will create the new account, and add them to the sudoers group.
sudo su
passwd NewUser
visudo
Optional: Add the user to Sudoers
Step 2: Generate the Public/Private key files
Now we will create the public and private key files for NewUser. This tutorial assumes that the user is part of the ec2-users group. If not, please make sure to change the code where applicable.
Step 3: Download your private key
You will now have to download, or copy the contents of your private pem file. This should be called NewUser.pem.
If you are going to copy the contents of the file to a key file on your local system, just copy and paste the data into a new file.
Before using your key, make sure to change the permissions to 600.
Step 4: Test your SSH Login
Now let’s test our password-less login to make sure the private pem files are working.
That should do it! Hope you find this tutorial helpful. Feel free to ask any questions!
- How to Setup and Secure Linux SSH Logins to use Private PEM Keys
- How to Setup and Secure Linux SSH Logins to use Private PEM Keys
- Setup the SSH server to use keys for authentication
- How to Setup and Use Github in Ubuntu
- How to Use Google API Keys
- Linux Why and How to use NetLink
- [Docker] How to setup private registry
- SSH logins using keys
- How To Use Putty with an SSH Private Key Generated by OpenSSH
- how to setup SSH on ubuntu
- How to Setup OpenStack to use Local Disks for Instances
- How To Check and Use Serial Ports Under Linux
- How to Configure, Install and Use libnefilter_queue on Linux
- How to Configure, Install and Use libnefilter_queue on Linux
- How to Setup Nutch and Hadoop
- How to use SSH in Java Programmatically
- How to Set Up SSH Keys In Ubuntu
- How To Setup Partitioned Linux Block Devices Using UDEV (Non-ASMLIB) And Assign Them To ASM
- server Library [Apache Tomcat v6.0](unbound)
- 查看Oracle中表的索引是否存在
- 【草莓音乐节】现场美女大放送
- 网站如何获得高质量外链资源
- python 网络爬虫
- How to Setup and Secure Linux SSH Logins to use Private PEM Keys
- java动态编程简述
- 淘宝PHP SDK 2.0 剔除 lotusphp框架
- pb中截取混排字符串
- HDU 4784 Dinner Coming Soon(BFS+优先队列+状态转移)
- Qt Creator快捷键速查
- Thrift辅助类,用于简化Thrift编程
- C语言itoa()函数
- 关于ScrollView的一些属性设置