I need SSH access to an Amazon EC2 instance running Ubuntu 10.4. All I got is the amazon username and password. Any ideas?
相关问题
- Why doesn't php sleep work in the windows-subs
- JQ: Select when attribute value exists in a bash a
- Installing Pydev for Eclipse throws error
- Error building gcc 4.8.3 from source: libstdc++.so
- what's the role of libopenssl-ruby?
相关文章
- 为什么nfs在不同版本的Linux下安装的文件都不一样
- I cannot locate production log files on Elastic Be
- Incompatible JavaHl library loaded
- Python - Node.js (V8) runtime is not available on
- Ubuntu graphviz 'sfdp' not working
- AWS - Configuring access to EC2 instance from Bean
- Gearman , php extension problem : Class 'Gearm
- Decrease the tabs bar height in gnome terminal
just use
ubuntu
instead ofroot
. Your problem will be solved. Cheers!Not logging in as the correct user for you OS Distro could be the issue. For certain new AMI, the username may not be "ubuntu", but "ec2-user". For Amazon Linux, for instance I believe the user is "ec2-user". Eric Hammond gives examples here: http://alestic.com/2014/01/ec2-ssh-username
My suggestion, try:
If you have the wrong AMI, you might just want to restart the machine altogether so you have uniformity amongst your clusters. If this is your problem, you'll probably want the same OS Distro's at least for your linux boxes.
Make sure these thing in check
private key must have 400 permission
Make sure port 22 is open for AWS instance you are trying to access.
ssh -i privatekey.pem ubuntu@XXX.XXX.XXX.XXX
// XXX.XXX.XXX.XXX = your instance public ip1) First
chmod
the.pem file
for restricting the file permissons as below2)Then
ssh
with the following commands directly from.ssh
folderssh -i my-key-pair.pem ec2-user@ec2-198-99-90-3.compute-1.amazonaws.com
Note:- To navigate into
.ssh
folder. First pressCtrl + H
to display all the hidden files and finallycd .ssh
If you are using MacOS, you should create/edit SSH configuration file (~/.ssh/config) and put something like:
Then to connect to any of EC2 instances:
Nothing more!
Note, the current user for 13.04 is "ubuntu" ssh -i ./mykey.pem ubuntu@ec2-xxx-xxx-xxx-1.compute-1.amazonaws.com