Unable to SSH into new Lightsail instance created from snapshot - amazon-lightsail

I have a Lightsail instance with a snapshot. After creating a new instance using that snapshot, I am unable to connect via ssh. I am still able to connect via ssh to my original instance.
Thanks,
Nico

Related

SSH connection to gcloud VM instance not working

I am using a VM instance with 30gb disk space. Cloning my projects into this instance. While I was cloning one project, it showed "disk is out of space". So, I turned off all the processes running in this instance, closed all SSH connections and stopped the instance. Went to Disks, increased space from 30GB to 35GB. While starting a new SSH connection with this instance, it is not connecting. Sometimes, it goes on trying but doesnt connect. Sometimes, it shows an error
Connection via Cloud Identity-Aware Proxy Failed
Code: 4003
Reason: failed to connect to backend
You may be able to connect without using the Cloud Identity-Aware Proxy.
Tried to connect from gcloud shell, it shows me that no SSH keys are present. And ~/.ssh/authorized_keys is empty. Tried to copy key from google_compute_engine.pub to authorized_keys but not worked. Tried by creating new key and then copying it to authorized_keys > Not worked. While copying these keys, it showed me permission denied(publickey) error. While connecting from gcloud shell too, shows the same erroe.

Connecting to a gcloud vm instance via ssh

Problem:
I cannot connect via ssh to my vm instance on gcloud
Description:
I am using gcloud with my own domain as the user userid#mydomain.com
I created a vm instance on Google Cloud Engine
I installed "WordPress Multisite Certified by Bitnami" via Cloud Launcher
The vm is up and running, I can even access a wordpress page.
In the section "VM Instances", I click the button SSH, but cannot connect, the window prompts:
Transferring SSH keys to the VM.
Could not connect, retrying (1/3)...
The log does not contain any errors.
Attempt 1: Gcloud API
In the Windows CMD, I can successfully connect by calling
gcloud compute ssh userid_mydomain_com#MY_INSTANCE_NAME
It generates file in C:\Users\ACCOUNT_NAME.ssh, but the file google_compute_engine.pub contains my Windows account name at the end in the format HOST\account_name#host, not my gcloud user name (userid#mydomain.com)!
I retried the ssh button, but it still failed.
I then pasted the content from the file google_compute_engine.pub into the ssh key field, but it still doesnt work, perhaps due to the wrong user name? I changed the name, but that didnt help.
Attempt 2: PuttyGen
I also tried generating ssh key with PuttyGen as described here and used userid#mydomain.com in the key comment. With or without the newly generated public key in the vm instance configuraton, I can not ssh into the vm.
Question:
How can I access my vm on gcloud via the ssh button and via putty?
Update:
I can connect to my vm instance using Putty and WinSCP.
I entered the keyfile provided in the Bitnami launchpad and the user name 'bitnami'. The ssh buttons, however, still dont make me enter.
You might not be using the right credentials. However, it's pretty weird the Web Browser Terminal Google offers
you through the SSH button doesn't work.
Please take a look to the documentation below and try to follow the steps, it might help you:
https://docs.bitnami.com/google/faq/#how-to-connect-to-the-server-through-ssh
You can connect to a VM instance via many ways:
SSH from Google cloud console
Connect via Cloud shell
Connect via your local terminal with gcloud command with IAP by using --tunnel-through-iap parameter.
gcloud compute ssh userid_mydomain_com#MY_INSTANCE_NAME --tunnel-through-iap

unable to connect to the google cloud instance (port 22: Operation timed out)

I had created the the keys for the google cloud instance and when I try to ssh into the instance. I'm unable to access it and getting an error: port 22: Operation timed out. This happens through both the desktop ssh client and also through the google cloud shell. I had created a project wide keys in the metadata section to access it.
Any insights on why I'm unable to connect will be highly helpful. The instance was created a day ago.
Couldn't figure out why I was not able to ssh into the server previously. But now there is a single click option to ssh into the google cloud instances. You may close this thread.

how to make amazon EC2 instances authenticate each other automatically?

I am using aws java sdk to launch EC2 instances (running Ubuntu 12.04) and run a distributed tool on them, the tool uses openMPI for message passing between the nodes and openMPI uses SSH to connect nodes with each other.
The problem is that the EC2 instances don't authenticate each other for SSH connections by default, this tutorial shows how to set up SSH by generating keys and adding them to nodes, However, when I tried to add the generated key to the slaves using the command
$ scp /home/mpiuser/.ssh/id_dsa.pub mpiuser#slave1:.ssh/authorized_keys
I still got permission denied. Also, after generating new keys, I was not able to log in using the ".pem" key that I got from amazon.
I am not experienced with SSH keys, but I would like to have some way of configuring each EC2 instance (when its firstly created) to authenticate the others, for example by coping a key into each of them. Is this possible and how It could be done?
P.S.: I can connect to each instance once it is launched and can execute any commands on them over SSH.
I found the solution, I added the amazon private key (.pem) in the image (AMI) that I use to create the EC2 instances and I changed the /etc/ssh/ssh_config file by adding a new identity file
IdentityFile /path/to/the/key/file
This made SSH recognize the .pem private key when it tries to connect to any other EC2 instance created with the same key.
I also changed StrictHostKeyChecking to no, which stopped the message "authenticity of host xxx can't be established" which requires users interaction to proceed with connecting to that host.

Amazon EC2 ssh timeout

I am new to AWS services. I created an EC2 instance of Ubuntu and I was able to connect to it. I was able to run TeamCity and Rails server on the instance and things were fine. I created an image of the instance and now I can not ssh back.
Help is much appreciated. Thanks!
which country are you from? i know in china, the instances of ec2 cannot be connected unless you use a VPN tool.