Amazon aws ec2 login via putty - amazon-web-services

I had successfully used putty to login into Debian-8.1 on AWS by using key file. Once I upgraded debian using the command apt-get upgrade and tried to login through putty, it shows the error which i mentioned below:
putty fatal error: network connection refused
How can i resolve this?

I think Kernal Upgrade , Reboots the system in Linux and if you have not allocated Elastic Ip to the instance , the Ip would have have changed.
Did you Check the Instance IP ? Are you able to Login via Web based Interface from EC2- Console ?

Related

Is there any way to get the DNS address of an instance of an aws ubuntu server if I do not have the login to the aws account, but the SSH key for it

I got a task to deploy a static website on an AWS Ubuntu Server, I was given the username and the SSH key for it. Using PuTTy I got access to the server, setup django, postgres nginx and gunicorn. However now I need to check the progress and whichever tutorial I looked up, I found them checking their deployment progress with a dns address, but since I have connected to the server remotely, I do not have that. So please help me check my deployment status. I am attaching some screenshots of the PuTTy terminal below
Image of the final Gunicorn command to finish the deployment

Unable to install anything on AWS ubuntu

I thought of migrating my php application from shared hosting to AWS. however i'm facing some difficult while installing packages, whenever i try to install a package it saying connecting to some xyz server and halts, the installation does not proceed. I followed below steps
1.) I created amazon AWS free tier account
2.) I created a security group policy
3.) I generated a elastic IP from the pool
4.) I created an AWS ec2 instance using Ubuntu x64 v16 (Did all the setup and was fine)
5.) Generated the .pem key and downloaded it, also connected via SSH using the key, i'm able to connect
6.) I then associated the Elastic IP to the instance and restarted the instance
whenever i try to connect to the public IP address it says server took too long to respond or is not accessible. I thought might be i need to install Apache
I'm trying to install Apache, also not only Apache even if i run sudo update && upgrade it just shows a message connecting to server and hangs up!
What my be the problem? Where did i go wrong?

Connecting to Amazon EC2 using Filezilla SFTP - Network error: Connection refused

I am completely new to Amazon EC2 and Filezilla. When I try to connect to the server, I am getting an error message: "Error: Network error: Connection refused"
The problem is that I can't get a complete tutorial on how to use Filezilla with Amazon EC2. I try to follow the steps in this post: Connect to Amazon EC2 file directory using Filezilla and SFTP, but it is still not working.
What I have done so far:
I add the following ports in the Security Group of my instance:
Turn off temporarily Windows firewall on my Remote machine (I am
using Windows Server 2016 Datacenter) and on my pc also.
Filezilla:
I imported my key file in Settings > Connection > SFTP, the file has
.pem as extension, I renamed it to .ppk before import but it is
still not working. I also try to convert it using PuttyGen but it
does not work.
Questions:
Are my ports correct in the inbound rules ?
Do I need to run Filezilla server (available in Xampp control panel)
on my remote machine ?
Additional Info:
When I try connecting to the server using FTP(insecure):
I get the following error message:
Try using username:
username = ec2-user

Connect to EC2 instance with PuTTY, server refuses key

I have started an EC2 instance that I cannot connect to using PuTTY. I'm using a key pair that I created using PuTTYgen and then imported to AWS. I have specified the private key file on the client side in Connection -> SSH -> Auth. I have SSH on port 22 selected for PuTTY. The EC2 instance has a single security group, and this group has an inbound rule allowing TCP on port 22 from my home laptop's IP address. Still no joy when I try to connect.
In the PuTTY window I see this:
Using username "ec2-user".
Server refused our key
Also an error dialogue box pops up with this message:
Disconnected: No supported authentication methods available (server sent publickey)
What other things should I look into or do differently? I have been successful with this before so I know that it can work, but apparently I've forgotten one or more pieces of the puzzle.
Which Linux distribution are you using? ec2-user is only valid for Amazon Linux. If you use another Linux distribution user is root or ubuntu (for Ubuntu Linux).
For any future searchers having this problem, I found one more issue. I downloaded the .pem key from AWS and converted to .ppk and tried to ssh using Putty, and I would get 'Server refused key'. After much hair pulling I randomly updated Putty to the latest available version (0.77 as of writing) and that solved my issue. Same issue with WinSCP.

How to enable or browse web service running on EC2 on local machine?

I have EC2 instance that has port forwarding enabled for EMR cluster. Ganglia monitoring service is already running on EMR. I am able to browse Ganglia from EC2 instance with following using "text browser" Lynx.
lynx http://localhost:5000/ganglia
However, I want to access this service from my local machine ( Mac Yosemite ). I did some research and found that I need X11 port forwarding. So now I also have X11 port forwarding enabled.
echo $DISPLAY
gives me following on EC2 instance
localhost:14.0
I am also able to run "xclock" and it launches clock on my local machine.
I tried to ssh into EC2 instance with this syntax .
ssh -C -c blowfish -N -L:1050:myEc2Server:5000 myUser#myEc2Server
Then if I type http://127.0.0.1:1050/ganglia in google chrome I get message saying no data received.
Can anyone point out what is going wrong ? I tried verbose log from local machine to Ec2 instance and it has following message -
channel 2: open failed: connect failed: Connection refused
In short, I want to be able to see Ganglia from local machine. Any help is appreciated.
~Cheers
I tested an ssh command line from my own laptop (Mac Yosemite) and the following works
ssh -N -L:1050:localhost:5000 username#public-dns-of-ec2-instance
After this is connected, I verified using:
http://localhost:1050/ganglia.
In your command line above, you may just need to replace myEc2Server with localhost or 127.0.0.1.