Amazon Linux AMI - Upgrade OPenssh version - amazon-ec2

I am using a Amazon Linux AMI base ec2 instance. The current openssh version on the instance is
OpenSSH_6.2p2
Question is how to upgrade it to openssh 6.4.
I was searching it and could not find the answer

An updated openssh package is available in the Amazon Linux AMI repositories. This update adds fixes for CVE-2014-2653 and CVE-2014-2532. To install the update run:
sudo yum install openssh

Related

Can I install and run Memgraph on Amazon Linux?

I would like to run Memgraph on Amazon Linux. How can I install it? Are there prebuild packages specific for Amazon Linux?
For Amazon Linux you would probably need a working build for Fedora. Currently, Memgraph did not release a build for Fedora, but plans to do so soon. If possible, try installing Memgraph with Docker on Amazon Linux.
You can download the Memgraph package for Linux on the Memgraph download page. At the moment Memgraph offers installation packets for the following Linux distributions:
CentOS 7
CentOS 9
Debian 10
Debian 11
Debian 11 (ARM64/AArch64)
Ubuntu 18.04
Ubuntu 20.04
Ubuntu 22.04
On top of that, you can install Memgraph as Docker on Linux.
Also, if you want, you can deploy Memgraph using Docker or Kubernetes.
Amazon Linux is not listed and supported at the moment. Since it supports RPM packages, packages for CentOS could work but I didn't test it.

public key issue on installing google-cloud-sdk on ec2

I'm installing google-cloud-sdk on an AWS ec2.
As first step I'd updated YUM with Cloud SDK repo information as reported on GCP official doc. But when I try to install gcp sdk by:
sudo yum install google-cloud-sdk
i got:
Public key for ******************-google-cloud-sdk-316.0.0-1.x86_64.rpm is not installed
And I don't understand how to resolve the issue because the wget (from the ec2 machine) of the gpg keys works.
Someone knwos how to resolve it?
My /etc/yum.repos.d/google-cloud-sdk.repo:
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
Is always recommended use the latest version of Cloud SDK, also, about the error message you are getting usually could be mitigated on two ways:
Disable the rpm signature check in YUM repo config
Import the public keys on server
Regarding to the point 2, you can import the key pair as is recommended in the official Ec2 documentation.

lxc-attach failed to enter the namespace - EC2 Instances

For some reason I cannot enter a docker container using Lxc-attach only on EC2 instances. This works on my local machine and on Digital Ocean (KVM) droplets but not on Amazon EC2 xen-paravirtualized Ubuntu12.04 instance. Here are the steps/errors:
root#ip-172-31-46-202:~/scalar/project/docker# lxc-ls
4074ebf985cfe09b2880a9eabbc7ad3e59283f425f64cfaa72f59f1f23661d18
root#ip-172-31-46-202:~/scalar/project/docker# lxc-attach -n 4074ebf985cfe09b2880a9eabbc7ad3e59283f425f64cfaa72f59f1f23661d18
lxc-attach: No such file or directory - failed to open '/proc/19731/ns/pid'
lxc-attach: failed to enter the namespace
Does anyone know if there is a way to resolve this issue? Here are my docker version details:
Client version: 0.7.6
Go version (client): go1.2
Git commit (client): bc3b2ec
Server version: 0.7.6
Git commit (server): bc3b2ec
Go version (server): go1.2
Last stable version: 0.7.6
Also:
lxc version: 0.7.5
What is your kernel version?
lxc-attach requires features that are not present in the native 12.04 kernel (3.5). You need at least 3.8 which IIRC is available in the backport.
As Creac suggested, the kernel was not of a high enough version. (and if I try re-deploying an AWS ubuntu image it still uses kernel 3.2)
To fix this issue, I ran the following command to get 3.8:
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
or you can run the following command to get 3.5
sudo apt-get install linux-image-generic-lts-quantal linux-headers-generic-lts-quantal
Please note that these commands are Ubuntu specific (as per the question) and will install the "generic" kernel rather than the "virtual" kernel, but should work. [source]
Note that I tried to update Creac's original answer with this additional information but the edit was rejected so I felt the need to create a new answer for others to use if they want.
source of where I found the commands

How do I install SSSD on Amazon Linux

I want to do LDAP authentication on my Amazon Linux server.
The CentOS howtos say to
yum install sssd
But that gives:
No package sssd available.
Amazon Linux is not Centos, it doesn't use the same repositories. Generally, Amazon Linux is mostly compatible with Redhat/Centos repositories. But you may run into dependency issues.

How can I use/install "make" on the Amazon Linux AMI for EC2?

I'm a new user of Amazon EC2.
I want to compile the pptpd package on EC2, but receive the following error:
[root#ip-10-112-xxx-xxx /]# /var/tmp/rpm-tmp.2eILT0: line 58: /usr/bin/make: No such file or directory
I searched the entire root directory tree, but make isn't available:
[root#ip-10-112-59-187 /]# find . -name "make"
./etc/mail/make
I'm wondering whether make is actually installed on the Amazon Linux AMI initially? If not, how do I install it?
Preface
The Amazon Linux AMI is (loosely) based on CentOS and a perfectly decent OS for EC2, in fact it has been tailored by Amazon for EC2 specifically:
The Amazon Linux AMI is a supported and maintained Linux image
provided by Amazon Web Services for use on Amazon Elastic Compute
Cloud (Amazon EC2). It is designed to provide a stable, secure, and
high performance execution environment for applications running on
Amazon EC2. It also includes packages that enable easy integration
with AWS, [...]. Amazon Web Services provides ongoing security and
maintenance updates to all instances running the Amazon Linux AMI. [...] [emphasis mine]
However, it is indeed not as widely used yet as some other distributions, with the most popular likely being Ubuntu due to its popularity in general and its dedicated long time tailored support of EC2 in particular (see e.g. the EC2StartersGuide, the Ubuntu Cloud Images or the convenient listing of the Ubuntu AMIs for Amazon EC2 on alestic). This yields two drawbacks:
You'll find much more examples/tutorials/etc. for EC2 based on Ubuntu, making things easier eventually.
You'll find slightly less precompiled packages available for CentOS, requiring compiling your own eventually (but see below).
Solution
That said, CentOS (and the Amazon Linux AMI in turn) uses the Yum package manager to install and update packages from CentOS (and 3rd party) Repositories (Debian/Ubuntu use the APT package manager instead - the inherent concepts are very similar though), see e.g. section Adding Packages in Amazon Linux AMI Basics:
In addition to the packages included in the Amazon Linux AMI, Amazon
provides a yum repository consisting of common Linux applications for
use inside of Amazon EC2. The Amazon Linux AMI is configured to point
to this repository by default for all yum actions. The packages can be
installed by issuing yum commands. For example:
# sudo yum install httpd
Accordingly, you can install make via yum install make (you can get a listing of all readily available packages via yum list all).
Be advised though, that you might actually not need to do that, insofar the Amazon Linux AMI has been built to be binary-compatible with the CentOS series of releases, and therefore packages built to run on CentOS should also run on the Amazon Linux AMI. [emphasis mine]
The desired package pptpd is not part of the standard repositories on CentOS either though, but it is available in the 3rd party Extra Packages for Enterprise Linux (EPEL) repository (see Letter P) - I can't comment on the viability of using this one vs. compiling your own though.
Good luck!
Make is not installed by default on Amazon Linux AMIs. However, you can install it quite easily with yum. If you choose to only install make, you might get some errors later for other packages in the compilation process. If you are going to compile software, you might want to just install all of the development tools at once.
sudo yum groupinstall "Development Tools"
sudo yum groupinstall "Development Tools"
According to the documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html

Resources