Skip to main content
20 votes

How do I change my default shell on a AWS instance?

I came here to just add more additional information. If you have troubles when install zsh in Amazon Linux AMI by Amazon, like when you run: sudo chsh $(which zsh) : // chsh command not found Then ...
Chau Giang's user avatar
14 votes
Accepted

How to ssh from one ec2 instance to another?

Method 1 - use the same keys on the servers: Convert the keys to openssh format and upload the private keys to the servers. When you ssh to the destination host, specify the private key file: ssh -i ...
matiu's user avatar
  • 276
14 votes
Accepted

How do I check the event-history of a (possibly deleted) ec2-instance?

You should be able to use Amazon CloudTrail if you have access. There you can use filters to select EC2 instance history, for example, and see which account was responsible for its deletion, as well ...
TheKLARKEN's user avatar
13 votes

Can I install EC2 Amazon Linux OS locally on virtual machine?

Yes, you can! While on May 13, 2016 you can't do it... actually, as of today, December 13 2017, the answer is yes, you can install Amazon Linux 2 on your own machines and in his Amazon AMI image! ...
Kingdon's user avatar
  • 281
9 votes
Accepted

How to solve 404 Error in AWS apg-get for debian jessie fetch?

The error has nothing to do with Amazon or with your CircleCI configuration. Jessie's repos have moved to debian's archive and you need to update the following file: /etc/apt/sources.list The new ...
Fanatique's user avatar
  • 4,908
8 votes
Accepted

Unable to mount Elastic File System on EC2 (mount.nfs4: Connection timed out)

You probably need to create inbound policies. From the amazon documentation: The file system must have a mount target whose network interface has a security group with a rule than enables inbound ...
Jorge's user avatar
  • 96
8 votes

How to ssh from one ec2 instance to another?

There is a 3rd and IMHO the best solution so called ssh agent forwarding: on local machine configure ~/.ssh/config, by adding following section: Host <ip-or-name-of-A-server> ForwardAgent ...
Robert Lujo's user avatar
8 votes

How do I setup ftp/sftp on aws

If you don't want to use AWS Transfer for SFTP, it is possible to set up your SFTP server directly from an EC2 instance. If you follow correctly these instructions you should be able to create ...
smallwat3r's user avatar
7 votes
Accepted

Where is the password for newly created EC2 user?

The procedure given in the article you linked does not have you set a password, so there is no password. To set a password, login as a user that is allowed to sudo and run: sudo passwd newuser You ...
James T Snell's user avatar
7 votes
Accepted

Can you recover ~/.ssh contents on AWS EC2 with an open session and keys?

You cannot recover it. But as long as you have your session open, you can re-create the authorized_keys the same way, you would create it for the very first time on a normal *nix system. create ~/....
Martin Prikryl's user avatar
7 votes

Installing mod_php for Apache after installing Remi repo version of PHP 5.6

When you run this command: yum install mod_php It will automatically default to the Amazon repository. So if you installed PHP 5.6 via Remi’s repo, you should use this command: yum install php56-...
Giacomo1968's user avatar
  • 56.1k
7 votes

yum install for postgres 9.6 rpm on Amazon Linux 2 on EC2 is failing due to dependency

Try sudo amazon-linux-extras Amazon has a dedicated channel https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
Gramos's user avatar
  • 71
7 votes
Accepted

Cannot install Nginx on AWS EC2 AMI2 - Topic :topic: is not found

You need to do the following: Type amazon-linux-extras to list the packages that are there, and copy the version of nginx, for example nginx1.2 Then type sudo amazon-linux-extras install nginx1.2
Algeriassic's user avatar
  • 1,659
7 votes

Malicious request in log

The first attempt (?a=fetch&content=die(@md5(HelloThinkCMF))) is an old WordPress exploit. If you are running WordPress and haven't updated it in years, do so. Otherwise, that won't do anything. ...
sherrane's user avatar
6 votes
Accepted

What does it mean On-Premises and Colocation? What is the difference between them

From my personal experience, On-premises and Colocation are similar in that the customer owns the equipment that is in question. The difference is where the equipment is located at. On-premises ...
Blerg's user avatar
  • 1,230
6 votes
Accepted

Problems to connect with remote redis-server

Port 6379 doesn't need to be open for the EC2 servers, but it does need to be open for the Redis server. Can you check that port is 6379 opened in your AWS security group. And try again. And make ...
dsa's user avatar
  • 76
6 votes
Accepted

How is Amazon Lightsail cheaper than Amazon EC2?

The smallest Lightsail instance actually is a t2.nano ($4.39) with a 20 GiB EBS volume ($2.00) and up to 1 terabyte of outbound data transfer ($90.00), priced at $5.00. $5.00 is a substantially lower ...
Michael - sqlbot's user avatar
6 votes

How to ssh to EC2 *without* having to specify the .pem file?

Most command-line options can be specified through ~/.ssh/config, either globally or for individual hosts. The equivalent of -i is the IdentityFile option. If this key file is only used for EC2, it's ...
grawity_u1686's user avatar
5 votes

Unable to send files via SCP

I just came across this same issue. The solution was what someone pointed out (if you have eval `ssh-agent` change it to eval `ssh-agent' > /dev/null BUT the important thing is that this needs to ...
Martin's user avatar
  • 171
5 votes

Feasiblity to host Tor Hidden Service in Amazon EC2?

I believe that it is possible to run a Tor Hidden Service in an EC2 instance. However their terms of service prohibit exit nodes from being run. Some people run bridges or relays in EC2 and that seems ...
torchhound's user avatar
5 votes

"Guest-specific operations were attempted on a machine that is not ready for guest communication." exception when provisioning an AWS EC2 machine

My environment is have a homestead to work with Laravel, but I'm using Vagrant Box, so I have this problem, the solution that I found was: Works for me: vagrant reload --provision Inside the folder ...
RafaelPlantard's user avatar
4 votes
Accepted

Is it possible to convert .img to ami for use with amazon EC2

Did you check AWS documentation ? Here is what it says: Export your your VM from its virtualization environment, Import/upload the VM file to S3 bucket. Which will be seen here as a file on S3 bucket....
Algeriassic's user avatar
  • 1,659
4 votes
Accepted

cant install google-chrome on amazon red hat server

I solved it , got it to install the latest chrome version and got it to work in headless mode , used a very effective script on https://intoli.com/blog/installing-google-chrome-on-centos/ quickest ...
Taher Khalil's user avatar
4 votes

Setting CPU Frequency on Amazon AWS

You don't do anything. You don't have control of the physical CPU parameters because you are in a virtual machine. From https://aws.amazon.com/ec2/instance-types Each vCPU is a thread of either ...
Mokubai's user avatar
  • 93.8k
4 votes

Can Windows Server 2019 on EC2 run WSL 2

There are 2 issues with WSL 2 on Windows Server 2019 on EC2: 1) WSL 2 is available only in Insider builds at the moment. It is unlikely that it would be added into Windows Server 2019 at all, and ...
ISanych's user avatar
  • 396
4 votes
Accepted

How to install pass (password store) on EC2?

Unfortunately, pass was retired from epel 7 (https://bugzilla.redhat.com/show_bug.cgi?id=1639806) The latest pass requires Git version >= 1.8.5 and tree version >= 1.7.0 (in my ec2 machine tree is at ...
Tino's user avatar
  • 186
4 votes
Accepted

Malicious request in log

You can use something like fail2ban for this. These are very common, do not be worried. Just install this thing on top of apache and it's gonna save you alot of bandwidth. Cheers.
lolc's user avatar
  • 68
4 votes

How to turn on IPv6 on an Amazon EC2 instance?

According to https://aws.amazon.com/blogs/networking-and-content-delivery/dual-stack-ipv6-architectures-for-aws-and-hybrid-networks/: Go to your VPC settings and assign a /56 prefix. Go to subnet ...
grawity_u1686's user avatar
3 votes

Quickest way to set up a HTTP/2 webserver on Amazon EC2?

The new version of Amazon Linux AMI (2017.09) was released. As the part of upgrade now AMI linux uses OpenSSL 1.0.2k and HTTP/2 protocol is now supported by AMI’s httpd24 and nginx. You can upgrade ...
Golubev Eugene's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible