Questions tagged [amazon-ec2]

Amazon Elastic Compute Cloud (EC2), which allows users to rent virtual computer systems, is part of Amazon Web Services.

Filter by
Sorted by
Tagged with
0
votes
1answer
49 views

99 % CPU taken up by “ps”

I have an EC2 t2.micro (Linux AMI) instance. Since a few days I noticed that RAM is being 99% used by "ps" . When that happens : $ free -m total used free ...
5
votes
3answers
570 views

How to fix infinite bash loop (bashrc + bash_profile) when ssh-ing into an ec2 server?

I mistakenly have source .bash_profile in the bashrc file and vice versa. Now when I tried to ssh into the machine (ec2), it will stuck at loading bash and get connection closed in a second. Is there ...
0
votes
0answers
13 views

auditctl doesn't log anything

I am trying to find app/activity on a server for failed connection to external mysql host. For that I decided to use auditctl. I'm running the following command: [nir]$ sudo auditctl -A exit,always -F ...
0
votes
1answer
33 views

can not install docker-ce in AWS EC2 instance : Error: package: containerd.io (docker-ce-stable) Need: container SELinux

I was trying to install Docker on g4dnx4xlarge, which is a GPU instance. Following the blog posted here original blog, I could not get it run. The error I got is: Error: package: containerd.io -1.4.3-...
0
votes
1answer
20 views

trying to copy file from one Gnu/Linux to another (on VMs), but getting ssh Permission denied

I have been trying to transfer file from one ec2 linux instance to another, so far I have tried ssh -l ec2-user@<ip address> in my source VM I get Permission denied (publickey,gssapi-keyex,...
1
vote
0answers
36 views

Connecting to EC2 via SSH with keypair

I have been trying to connect to EC2 via SSH with a key, but whenever I type the command chmod 400 key.pair.pem, I got this message: chmod : cannot access ' kp.pem': no such file or directory. In ...
0
votes
1answer
75 views

nohup ends when I close the SSH terminal and doesn't show up on ps/job when running

I have an AWS EC2 Ubuntu 20.04 instance, accessed via puTTY SSH. Running a Python process via OpenMPI through the following command on non root: nohup mpirun python3 job.py When the shell is open it ...
0
votes
0answers
88 views

Obscuring password in cloud-init userdata startup of AWS EC2 instance

An AWS EC2 instance creates a new user during its cloud-init startup process, and sets the password for that new user. Terraform is being used to trigger the creation of the new EC2 instance, which ...
1
vote
0answers
19 views

SSH Permissions Issue on AWS EC2 Linus Instance

When running trying to connect to github I get the following: $ ssh -T git@github.com Permission denied (publickey). Here are my permissions on the directory: $ ls -la ~/.ssh total 24 drwxr-xr-x 2 ...
0
votes
1answer
18 views

Expanded root volume but tmpfs and devtmpfs is limited

I have expanded root volume in my Amazon ec2 machine (Amazon Linux 2) but the space in tmpfs and devtempfs is still limited. Here is what output of df -h command looks like: $ df -h Filesystem ...
2
votes
2answers
33 views

How do I add an additional SSH user with a non-standard home directory to Centos 7 AWS Machine?

I have a CentOS 7 instance on AWS, and I connect using a .pem file. When I create a new user and follow the standard steps, (create .ssh directory, chmod 700 it, create authorized_keys file, copy the ...
0
votes
1answer
14 views

SSH Connection starts a bash process but wanted to start a process as soon as instance is launched on Amazon EC2 Instance

I have created an AMI of my instance on AWS and had shared that with my teammate and he wanted to start the server with exact my configuration. I have also written a bash script which starts the tmux ...
0
votes
3answers
2k views

Failed to get D-Bus connection: Connection refused

A sudo user named my-host is getting the following error message when trying to reload systemctl on an Amazon Linux 2 EC2 image. [my-host@ip-12-3-4-56 ~]$ systemctl --user daemon-reload Failed to get ...
1
vote
1answer
223 views

Start systemd service from Ansible Playbook

What specific syntax must be used to get an Ansible playbook to successfully start a systemd service and make sure that the systemd service is running on an Amazon EC2 instance? CURRENT SYNTAX: The ...
0
votes
2answers
29 views

How to store usage and memory percentage that are shown after login in AWS EC2

ec2 stats when we ssh into our instance we can see these stats displaying. Is there any way to get the same percentage stats with a terminal command?
0
votes
0answers
20 views

Investigating runaway traffic

On RHEL I have a server that every few days for few minutes sends 50x connection requests to the db. I couldn't find a lead in: crontab history of the users /var/log/messages nor secure How can I ...
0
votes
1answer
26 views

SSH pem/private-key based login error?

I just created an ec2-instance with Amazon Linux 2 OS, then logged in to the system using login: ec2-user and an associated privatekey. Next, I created a new user x and copied the .ssh/authorized_keys ...
1
vote
1answer
92 views

Reset Linux EC2 Server Password

Unable to login to EC2 ubuntu server due to permission issue. Issue: My EC2 ubuntu server has (root & ubuntu) user and I use to login to ubuntu using ssh. By mistake I have changed the ownership ...
0
votes
0answers
43 views

Access mounted directory in Linux

I have mounted 2 directories in my Linux system. $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.7G 0 7.7G 0% /dev tmpfs 7.7G 0 7.7G 0% /dev/shm ...
0
votes
0answers
687 views

sudo service sshd restart failed on AWS EC2 instance

I have created AWS EC2 instance and deployed Asp.Net Core Web API application. It works when deploying into server. After an hour, I was not able to connect my server using PUTTY or WinSCP. When i am ...
1
vote
1answer
579 views

No package systemd available on Amazon linux EC2

I am using AWS Linux machine to host Web API application. I need to make my application keep on run, so that i need systemd has to be installed on my linux machine.I tried sudo yum install systemd but ...
0
votes
0answers
65 views

aws ec2 describe-security-groups + awk sed

I am sure this is not the most efficient method, but I need help formatting the results of this aws command: aws ec2 describe-security-groups --group-ids sg-xxxxxxxxxxxxx --region=us-east-1 --profile=...
1
vote
2answers
215 views

Why does `pip` throw `ModuleNotFoundError` even though `setuptools` appears to be installed?

On an EC2 instance, I am attempting to install a Python package using pip, but receive an exception that states ModuleNotFoundError: No module named 'setuptools'. For context, the command I run is pip ...
1
vote
1answer
4k views

DISPLAY environment variable not set

I am using a Amazon Linux 2 (a Fedora/Cent OS like distro) EC2 machine with the Deep Learning AMI (Amazon Linux 2) Version 30.1 AMI. I want to use xclip and gedit in the remote instance. But if I type ...
0
votes
0answers
24 views

Xubuntu GUI not loading?

I just installed xubuntu-core on my amazon-ec2 server, but I can't get it to load into a UI. When I try to use sudo startx it throws an error, while sudo service lightdm start doesn't seem to do ...
1
vote
1answer
26 views

how to add password to an account that was created using --disabled-password?

I am following the guide add new user accounts with SSH access to my Amazon EC2 the point 2 has this note If you add the new_user to an Ubuntu instance, include the --disabled-password option to ...
0
votes
0answers
23 views

SUSE HA Cluster OverlayIP removal after reboot - SLES 12 SP4 (AWS EC2)

We are facing an issue with SUSE HA cluster nodes, Whenever a reboot happens on any of these HA nodes, Overlay IP is getting removed. Can someone help resolve this issue? Here is the configuration ...
5
votes
2answers
195 views

Setting ownership when copying or syncing files

When moving or copying files as root I often want to set the ownership for those files based on the owner of the directory I am moving the files to. Before I go off and write a script that parses the ...
0
votes
2answers
51 views

How to run an app automatically on reboot for different user?

I have a ec2 machine/redhat with Tomcat installed. I want only userX to start this app, not ec2-user. However, ec2 automatically boots with ec2-user after restart. How can I make my userX to execture ...
0
votes
1answer
39 views

ansible show hostnames in play recap summary instead of IPs when using ec2 dynamic inventory?

how to make ansible show host names from ec2 dynamic inventory tags or /etc/hosts instead of IPs in PLAY RECAP SUMMARY: Output: PLAY RECAP **************************************************************...
1
vote
1answer
138 views

Disconnected: No supported authentication methods for sudo user who authenticates using password

On an Amazon Linux 2 EC2 instance, password authentication from remote users has been enabled by running the following command during the cloud-init startup script: sed -i 's/PasswordAuthentication no/...
0
votes
2answers
75 views

Missing chrony package in Ubuntu Bionic

I am using HashiCorp Packer to build a new AWS AMI. I want to preinstall the NTP client Chrony (it's popular in our organization and it will get config support from people outside our team). But when ...
0
votes
0answers
90 views

How to encrypt nfs which is mounted on AWS ec2

We have netapp volumes attached to EC2 instance. these are nfs , which are sync with on premise and make sure data in on premise and that of NFS which is mounted on EC2 are in sync. even though ...
0
votes
0answers
26 views

Error in metric filter pattern in CloudWatch

I am trying to create the custom CloudWatch metric from the Log Groups I am trying to create the metric pattern for the status of the email. I just need to monitor the the response in email(success/...
0
votes
0answers
39 views

Rsync performance on on two Linux Machines

I am having two Virtual Machines (VM-source and VM-destination) and each with an NFS filesystem. I want to sync data (1TB) between the two machines and I am worried about the CPU/Memory needed for ...
0
votes
0answers
61 views

How to keep mac prompt customization when sshing into aws ec2 instances whose ip addresses change when I stop and restart the instance?

Summary: my goal is to have a prompt that's got a different color so I can easily distinguish between command line and output at a glance. Details: I have configured my mac terminal to show the ...
1
vote
1answer
55 views

Relationship between AWS EC2 VPC and Xen Networking

Does characteristics of networking configuration on AWS VPC (public IP, private IP, subnets, route and gateway) are derived of Xen networking model?
0
votes
1answer
143 views

How to help AWS EC2 crontab find a package?

I am new to AWS and Linux. I just set up my first AWS EC2 instance, (Amazon Linux 2 AMI (HVM)), transferred a simple Python project to it with scp, connected to the instance with ssh, installed ...
0
votes
1answer
585 views

Failed to authenticate with public key in jenkins

I have two different servers: Jenkins EC2 instance (my vuejs application) So When I am trying to deploy vuejs application using Jenkins SSH Plugin to remote server but it can't connect The log : ...
0
votes
0answers
58 views

RHEL 8.1 Custome Lorax-Composer AMI Image Fails to Start

I'm using Lorax-Composer to try and build a custom RHEL 8.1 image for upload to amazon AWS. For testing I am using a generic image built with Lorax and just a baseos install. I've followed the ...
0
votes
0answers
46 views

AWS: Connections drops after scp to ec2 instance. Have to stop/start ec2 insdtance to reeconnect

New to AWS: I ssh into my ec2 instance without issue until I use scp to copy files from another Linux box. 5 seconds after the transfer the connection is closed and the ec2 instance needs to be ...
2
votes
1answer
950 views

Timeout when connecting RDS using AWS session manager via EC2 instance

I am having trouble accessing AWS RDS instance in a private subnet using session manager through ec2 instance (Ubuntu). Port forwarding using AWS Session manager - aws ssm start-session --target ...
0
votes
0answers
51 views

How to forward path along with port

I'm willing to bet I have a fundamental misunderstanding here, but I am trying to do something akin to port-forwarding AND url-forwarding without using something like nginx. I have a remote linux ...
0
votes
2answers
258 views

What does “status=10/n/a” mean in systemd output?

I am developing a .service file so that systemd can manage an app as a service on Amazon Linux 2. But when I type systemctl start my-new-service, the following error is reported in the logs: Mar ...
-3
votes
1answer
158 views

mkdir permissions needed for script called by systemctl start service

How can I give mkdir permissions to a script that is called by sudo systemctl start <service-name> ?? Here is the error being thrown in the results of sudo journalctl -u jekyll -f when I type ...
-2
votes
1answer
397 views

Ubuntu Cronjob can't execute conda environment

Whenever I login to my ec2 Ubuntu instance my terminal is like this (base) ubuntu@ip-xx-xx-xx When I run my Python script which is converted from a Jupyter notebook with the default conda ...
0
votes
1answer
376 views

SSH into an AWS EC2 instance running a VPN

I want to use a third-party VPN service on a Amazon AWS EC2 instance, and set up NordVPN with OpenVPN. After following the instructions in this answer I'm still not able to SSH into the instance ...
1
vote
1answer
451 views

unable to recognize file. connection refused

On an Amazon Linux 2 instance, the command line is throwing the following connection refused error every time a command is run that references a file path. The same error is thrown when an https url ...
1
vote
2answers
43 views

Ability to halt/reboot server as user

I need to ability to halt an aws EC2 server as user. I found https://www.cyberciti.biz/tips/howto-linux-allow-users-to-shutdown-server.html but due to the fact that I need this feature on an aws EC2 ...
0
votes
0answers
128 views

EC2 SSH connection refused after changing elastic IP and reboot

I've browsed several dozen copies of this question but none of them seem to fix my situation. I have already checked: permissions on pem key (it worked before) checked correct new ip in ssh config ...

1
2 3 4 5
7