Connecting to an AWS instance on windows from CLI - amazon-web-services

I am trying to execute the following command on cmdline (windows) ssh -i "publicec2instance.pem" #ec2-user<>compute.amazonaws.com
but it errors out saying
Failed to add the hosts to the list of known hosts (/home/<>/.ssh/known_hosts)
I tried to install cygwin to emulate unix cmd line to run the same command but it is not recognizing ssh itself.
Could you please point me in the right direction

SSH is used to connect to Amazon Linux EC2 instances.
To connect to Amazon Windows EC2 instances, use Remote Desktop (RDP).
Here is a document that will walk you this process.
Connecting to Your Windows Instance

Related

Permission denied (publickey,gssapi-keyex,gssapi-with-mic) on PowerShell

I am trying to connect an AWS CentOS instance from an AWS Windows instance using PowerShell of the Windows instance. But I am getting the error "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)"
I am able to connect to the centos instance from my own windows PC using PuttY. I just don't have a Windows 10 in my PC to test with Powershell, So I created a Windows 10 instance in AWS and trying to connect through its Powershell, but in vain. I copied the private key (.pem) file from my own PC, pasted in the desktop of the Windows instance accessed through RDP and put the ssh command, but not able to connect.
Also, the security group of the linux instance has 3 Inbound rules, Allow Any IP from SSH/Port 22, HTTP/Port 80 and Any Traffic, Any IP/All Ports.(IP : 0.0.0.0/00)
Please point where i am going wrong.Thanks.
The ssh command I used :
ssh -i C:\Users\Administrator\Desktop\cent.pem centos#mydomain.compute.amazonaws.com

What is the best way to run a script remotely on Windows VM instance?

For example, in Linux VM instances we can use gcloud beta ssh command to run commands remotely by downloading ssh keys using gcp credentials
Similarly, I am looking for running scripts on Windows VM instance remotely without doing RDP to an instance.
Can someone point to a solution for this problem?
If you have a Windows workstation with PowerShell, you can connect to your Windows Server instances through a remote PowerShell session. This process is similar to connecting to a Linux instance using SSH. Please review "Connecting to Windows instances using the PowerShell terminal"
https://cloud.google.com/compute/docs/instances/connecting-advanced#powershell

GUI tools to access AWS EC2 running Ubuntu

I'm asking this here because google couldn't point me out in the proper direction. Are there any available tools for manipulating an EC2 instance via SSH using a GUI. I'm not very familiar with Ubuntu CLI commands (I actually crashed an instance by doing something over putty) so a GUI is my only option. What I actually want to do is to install a Glassfish web server on the instance. All necessary ports are forwarded (4848,8080,80).

Run ipython/jupyter notebook server on aws ec2 without an ssh client

I can set up a ipython/jupyter notebook server on aws ec2 by following this tutorial, it starts the remote server by entering $jupyter notebook in the local terminal.
However I also saw a pre-configured community AMI graphlab-create, which will run the remote server without the need of a Linux/Unix ssh client at all.
I'm wondering how that could be realized, since some students may not have an access to a linux/unix system. Any hint is appreciated.
Using windows is not an issue. I hooked up to my notebook in AWS from my home computer. I have Windows 10.
You can link up to AWS using putty.
I am using a Ubuntu AMI.
Once you have a terminal open you simply follow the instruction you gave in your link
It worked like a charm for me.

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.