Skip to main content

Questions tagged [amazon-ec2]

Amazon Elastic Compute Cloud (EC2) is a cloud-based computing platform.

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

Locked out of EC2 Ubuntu Instance after enabling MFA

I tried adding MFA on my EC2 Ubuntu instance, basically, I followed the steps here: Help! cant seem to get 2FA to work for my AWS ec2 SSH Except I did not comment @include common-auth in the sudo nano ...
JnrLouis's user avatar
0 votes
0 answers
28 views

ModuleNotFoundError: apt_pkg

I am trying to install Python in my EC2 instance using these commands: sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.12 However, upon running the first ...
Iqhwa's user avatar
  • 1
0 votes
0 answers
71 views

Setting a Single User Password on Ubuntu 20.04 EC2 Image

I have an AWS EC2 FIPS compliant 20.04 instance, I have applied the DISA STIGS to this instance, except for one. Every time I set the password for Single User mode I am no longer able to boot the ...
Michael Hatch's user avatar
0 votes
1 answer
377 views

Permission denied even if you enter the correct password when connecting to uuntu with ssh

I'm using Ubuntu 24.04 version of ec2 and I got into trouble here. Originally, public key access was good using a pem key on Ubuntu ec2, but I wanted to access ec2 only with a password without a pem ...
5hseok's user avatar
  • 1
0 votes
0 answers
58 views

Cannot get hvm parameter CONSOLE_EVTCHN (18): -22! after checking output of sudo dmesg command logs

I am running AWS EC2 Ubuntu 24.04 LTS instance and also I did the configuration of wordpress according to this documentation. I issue I am getting is instance reachability check failed then It will be ...
Shahryar Rafique's user avatar
0 votes
1 answer
2k views

accidentally did `sudo rm -r /*`, can I fix it? [duplicate]

I accidentally did sudo rm -r /* from a directory. I don't know what got deleted. Now I can no longer login to my instance via ssh. Is there a way to recover the instance or creating new one is the ...
Rana's user avatar
  • 1
0 votes
0 answers
117 views

How to sync an Ubuntu machine inside AWS using NTP

I have an Ubuntu instance inside AWS, which communicates with a third-party instance, also in AWS. I would like to ensure my instance's system time matches their's as close as possible. They have told ...
intrigued_66's user avatar
0 votes
0 answers
309 views

port 22: Connection refused, but only 60% of the time

I am running this: ssh_command = f'ssh -vvv -o StrictHostKeyChecking=no -i {private_key_file} ubuntu@{public_ip}' # Use os.system to execute the SSH command in a subshell os.system(ssh_command) ...
BigMistake's user avatar
0 votes
0 answers
168 views

Ubuntu Pro on AWS | Temporary failure in name resolution

I created a new EC2 instance with Ubuntu Pro 22.04 image. After 1st access, I updated system packages and Audited/fixed using usg command. After usg fix command, I rebooted the system and upon 1st ...
Muhammad Laique Sario's user avatar
0 votes
1 answer
306 views

AWS userdata does not run on custom Ubuntu AMI

I've created a custom Ubuntu ISO with Autoinstall and userdata to set up a virtual machine (VM) in our VMware setup. This VM is then converted to OVA format, uploaded to AWS S3, and converted to an ...
Utz's user avatar
  • 79
0 votes
0 answers
266 views

AWS EC2 Ubuntu Instance tightvncserver with RealVNC on Win11Home

I've followed the tutorial step by step Ubuntu VNC on AWS EC2 ubuntu@ip-172-31-17-214:~$ uname -a Linux ip-172-31-17-214 6.2.0-1015-aws #15~22.04.1-Ubuntu SMP Fri Oct 6 21:37:24 UTC 2023 x86_64 ...
Timy Shark's user avatar
0 votes
0 answers
334 views

Deploying multiple flask app aws + gunicorn + nginx

I am trying to deploy multiple Flask applications in a AWS EC2 without success :(. I'm following this tutorial, the steps seems to be simple enough, however I haven't managed to make it work. This is ...
drn_svq's user avatar
  • 11
0 votes
0 answers
104 views

Could not install packages due to an Environment Error: [Errno 28] No space left on device

I am trying to install the terserflow. I have a t2.xlarge instance type but every time I get an error. Can you please help me with how much storage I have to take? ERROR: Could not install packages ...
user9437856's user avatar
1 vote
1 answer
1k views

Cron not working in the new EC2 instance. If run manually then it's working

I have set up a new EC2 instance. Everything is working perfectly. Now this morning I have set the cron and below is an example of cron */5 * * * * /usr/bin/php https://www.xyz.in/api/cron/index.php ...
user9437856's user avatar
1 vote
2 answers
357 views

Partition UUID was changed automatically

I have an EC2 running on AWS cloud with the following specifications: Operating System: Ubuntu 22.04.1 LTS AMI ID: ami-07651f0c4c315a529 AMI Name: ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-...
Kent Ho's user avatar
  • 11
0 votes
0 answers
878 views

setup cuda , Cudnn nvcc version 11.8 in AWS ec2 Ububtu 22.04 instance

Trying to setup Cudnn with nvcc --version 11.8 in EC2 g4dn UBuntu 22.04 LTS with T4 GPU setps followed . sudo apt update && sudo apt upgrade -y sudo apt install nvidia-driver-535 sudo reboot ...
vervit khandelwal's user avatar
1 vote
1 answer
7k views

Server refused our key - No supported authentication methods available (server sent: publickey) - Permission denied (publickey): Ubuntu server

I have an AWS EC2 instance running. I was able to connect using my chomed (-r--------) keys using MobaXTerm and SSH (Ubuntu for Windows) (.pem key) and putty (.ppk key). I'm also working on the server ...
gonzalez.ivan90's user avatar
0 votes
0 answers
139 views

Upgrade to Python3.9 cannot ssh to the Ubuntu EC2 instance

I'm creating a custom AMI using packer and ansible. The base AMI is an Ubuntu 20.04 provided by the Canonical and it's customized using an ansible playbook. I'm installing python3.9 and setting it as ...
droritzz's user avatar
0 votes
0 answers
323 views

How to fix Trojan:EC2/DGADomainRequest.B

I have an EC2 instance which had some WordPress websites. My Ubuntu version is 20.04. A few days ago they were affected by malware and I have removed all malware from these websites, but in my AWS ...
Mohammad Fathi Rahman's user avatar
0 votes
1 answer
224 views

AWS EC2 ubuntu box authentication by using Azure AD

I need your help to integrate user account on AWS EC2 ubuntu box by using Azure AD Credentials. We have an azure account where we have created users which in used by email and other SSO services. we ...
bhupesh k's user avatar
0 votes
0 answers
402 views

Header set Access-Control-Allow-Origin code added but nothing is happening

I am trying to solve the below option on my website Strict-Transport-Security Content-Security-Policy X-Frame-Options X-Content-Type-Options Referrer-Policy Permissions-Policy I found the below ...
user9437856's user avatar
0 votes
0 answers
58 views

Giving loopback device another IP in EC2 user_data.sh?

On an AWS EC2 instance, I would like to configure my loopback device with another IP, e.g. 10.0.0.100/32. The configuration would need to happen in the user_data.sh script, so is there a simple ...
eof's user avatar
  • 101
1 vote
1 answer
1k views

Connecting to IPSec IKEv2 VPN from CLI

I have set up an IPSec VPN on an AWS ec2 instance following this https://github.com/hwdsl2/setup-ipsec-vpn. The VPN works fine I am able to connect to it from my Phone and Laptops ( Android, Windows, ...
Rohit's user avatar
  • 121
0 votes
0 answers
408 views

The connection has timed out error after installing apache2 in Ubuntu 22.04.2 LTS

I have installed apache2 in Ubuntu 22.04.2 LTS. When I hit my IP address in the browser to check the Apache page, I get the below error. The connection has timed out I have tried the below command ...
user9437856's user avatar
1 vote
2 answers
474 views

getting permission denied when ssh to an instance from ubuntu 23.04 wsl

I recently updated in Ubuntu 23.04 wsl. I use the same certificate for both a very old 2017 aws linux instance and also for new aws linux instance. I am not able to ssh to the old 2017 aws linux ...
kumar's user avatar
  • 495
1 vote
1 answer
1k views

Docker doesn't seem to be running. Did you start it?

I try to install DataHub together with Docker on a t2.large AWS EC2 Instance running Ubuntu. I am following a installation guide for Docker and a guide for DataHub. The tests proposed by the guides ...
Merlin Nestler's user avatar
0 votes
0 answers
1k views

How do I restart a web server used by WordPress running on AWS EC2

I have inherited ownership of an AWS EC2 instance running WordPress. I am unfamiliar with Unix. I do not know how WordPress was installed. I do not know how to check what web server is running. ...
ant777's user avatar
  • 1
0 votes
1 answer
216 views

How I can restore/reset the /etc/fstab on amazon AWS EC-2 ubuntu 22.04?

In an amazon EC-2 instance I accidentally overwrote the /etc/fstab while I was adding a setting fro swapfile: echo "/swapfile none swap sw 0 0" | sudo tee /etc/fstab But I ...
Dimitrios Desyllas's user avatar
1 vote
0 answers
112 views

How can I pass the FQDN hostname to systemd?

I have an Ubuntu 20.04 system in AWS. The %H flag in systemd is replaced with the hostname as expected, but I need a way to capture the output of hostname --fqdn. %H outputs ip-10-0-0-188 on my ...
Josh Correia's user avatar
0 votes
0 answers
79 views

create and configure SSL certificate not vaild certificate https red error

create SSL certificate and configure apache2 server in AWS EC2 instance Create SSL using openssl sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/my-domain.key -out /...
Venkatesh's user avatar
2 votes
0 answers
437 views

How relevant is Grub password protection in the cloud?

I see a recommendation from a vulnerability scanning tool running in AWS EC2, targeting an instance running Ubuntu 20.04: GRUB bootloader is not password protected. An attacker can use the GRUB ...
Indigenuity's user avatar
1 vote
1 answer
396 views

systemd service won't boot at start

I'm running a service on a EC2 instance that should boot at start and whenever the script associated fails. So I wrote the service like this: [Unit] Description=Test [Service] User=ubuntu Type=simple ...
Voley Betz's user avatar
1 vote
0 answers
141 views

Download from multiple backup apt repository in ubuntu

I have AWS auto scaling group which scales out in peak hours. I'm facing unhealthy instances due to do AWS's apt servers being unresponsive sometimes. Err:68 http://ap-northeast-1.ec2.archive.ubuntu....
prashant kandel's user avatar
0 votes
2 answers
1k views

how to get the ip of my Ubuntu instance in AWS

How can I see the public IP address assigned to an EC2 instance, from within (i.e. after connecting) the EC2 instance? I can see the public IP address that is assigned to it, simply by looking in the ...
howtouselinux's user avatar
0 votes
1 answer
450 views

How to setup port to subdomain in AWS?

I have a domain (e.g. example.com) registered with godaddy.com and use AWS for hosting. Nameserver on Godaddy later added to AWS I have an ubuntu (t2.medium) apache server installed. My project in ...
Gobinda Nandi's user avatar
2 votes
0 answers
713 views

Unable to apt-get update on IPv6-only ubuntu server

Whenever I try to apt-get update on my IPv6-only ubuntu server, the command fails with connect (101: Network is unreachable) Cannot initiate the connection to us-east-2.ec2.archive.ubuntu.com:80 (52....
Benjamin Lloyd's user avatar
2 votes
1 answer
2k views

SSH connection fails after upgrade from 20.04 to 22.04

A team member just upgraded our AWS EC2 instance from 20.04 LTS to 22.04 LTS, and ssh connections broke as a result. Now when I try to open a session (in MobaXterm) I get: Server refused our key No ...
arayq2's user avatar
  • 141
0 votes
1 answer
539 views

Ubuntu 22.04 AWS import initramfs/initrd issue

I'm working on a multi-cloud deployment for Ubuntu 22.04 and I haven't done this since 16.04, I've got a raw image created with QEMU, and I'm trying to get it into AWS, the import is telling me: &...
Peter Turner's user avatar
0 votes
0 answers
188 views

How to configure a crontab to rsync via ssh on AWS using a pem file

I have two AWS EC2 server. One is production and the other is a replica. This command works from the command line. rsync -razv -e "ssh -i /home/ubuntu/migration/healthy.pem" /home/ubuntu/...
user1794918's user avatar
0 votes
2 answers
1k views

Proper way to shutdown an Ubuntu AWS EC2 instance?

Sometimes I need to shutdown an Ubuntu AWS EC2 instance so my company does not get changed for the time if I'm not going to use it for a few days. I'm not sure what is the proper or ideal way to do ...
cdahms's user avatar
  • 1,853
0 votes
1 answer
376 views

Cannot SSH into AWS EC2 Instance, Blinking Cursor

I cannot ssh into an EC2 instance I have created in AWS console. I just get blinking cursor when I typed this command: ssh -i "ansible.pem" [email protected]....
krillavilla's user avatar
1 vote
0 answers
598 views

Amazon Workspaces on ubuntu: copy / paste issue between multiple monitors

I am using Amazon workspaces on a Linux client: ubuntu. The Amazon workspaces are Windows 10. My issue is that I cannot copy / past anything across multiple monitors. I can copy and paste between the ...
Freedomnet's user avatar
0 votes
1 answer
288 views

Root Directory Keeps Changing Permissions (EC2), 403 NGINX Error

I am running a flask application using gunicorn/nginx. One of the issues I'm running into is that the permissions of my EC2 instance's root directory keeps changing permissions to drwxr-x--- which ...
WhimsicalWhale's user avatar
0 votes
1 answer
530 views

How to shrink the volume of an ubuntu ec2 instance on aws

I have an issue trying to shrink a 5TB EBS volume that runs ubuntu on AWS to a 200GB EBS volume. I created the snapshot and use it to create a new volume. Create a new volume of the size I want to use....
Raymond's user avatar
5 votes
3 answers
10k views

For new AWS instance, "Using username "ubuntu". Server refused our key."

I have been using Amazon EC2 instances in AWS. I have been successful connecting with WinSCP to a variety of instances, including Amazon Linux, Rocky Linux, SUSE, and CentOS 6, 7, and 8. All of ...
Eric's user avatar
  • 155
1 vote
0 answers
116 views

How to connect EC2 instance to Netbeans remote server?

I am trying to connect my AWS ec2 ubuntu instance to the Netbeans. While I am trying to connect with Netbeans Remote server then, It is showing the following error message. I have searched all the ...
Pushpendra's user avatar
0 votes
0 answers
2k views

Permission Denied (publickey) when using SSH

I have Ubuntu 20.04 running in VirtualBox as my control node. I am using AWS EC2 instances (Ubuntu) for my remote servers. Every time I try to ssh into one of my EC2 instances I get " Permission ...
Jessie's user avatar
  • 1
0 votes
0 answers
452 views

RDP on EC2 works until logging out and back in RDP, SSH works without issue - must reboot to get RDP to work again

I have a Ubuntu 18.x that I have installed XRDP on and GNOME so I can configure Security Onion 2 for my org. This is a VM running in AWS on a EC2. I have whitelisted my public IP for SSH and RDP in ...
CrackhouseASMR's user avatar
1 vote
2 answers
866 views

AWS EC2 Ubuntu 20.04.4 LTS STARTUP taking too long because of cloud-init / url_helper.py issue

Everytime I restart my server I get this cloud-init related error that slows the startup by 5 minutes. Where this error comes from and how can I fix this? [ 5.458859] cloud-init[869]: Cloud-init v. ...
Bruno's user avatar
  • 61
0 votes
1 answer
2k views

Ubuntu 20.04 Terminal Using the Screen Command

I've been using the "screen" linux command on an AWS EC2 instance to keep code running 24/7. Recently I tried the command in my ubuntu terminal and found that if I make a screen, run a ...
d22fish's user avatar

1
2 3 4 5
10