![]() For more information, see Configure access to the EC2 Serial Console. If the screen remains black, you can use the following information to help resolve issues with connecting to the serial console:Ĭheck that you have configured access to the serial console. If you're connected to the serial console, then a login prompt returns. Select the instance, then choose Connect, EC2 Serial Console, Connect.Ĥ. Select the instance, then choose Actions, Monitor and troubleshoot, EC2 Serial Console, Connect. Note: If you haven't previously used the EC2 Serial Console, make sure that you review prerequisites and configure access before trying to connect.ģ. You don't need a working connection to connect to your instance when you use the EC2 Serial console. ![]() You can access the Amazon EC2 console or the AWS Command Line Interface (AWS CLI). If you turned on the EC2 Serial Console for Linux, you can use it to troubleshoot supported Nitro-based instance types and bare metal instances. Run the following command to make sure that you changed the permissions on your key pair file so that only you can view it: $ chmod 400 my-key-pair.pemĬheck the directory and file name that you specify after the -i flag to make sure that it's the correct path to your private key, as shown in the following example command: $ ssh -i my-key-pair.pem Use the EC2 serial console For more information, see Convert your private key using PuTTYgen. Verify that you converted your private key (.pem) file to the format recognized by PuTTY (.ppk). Verify that the SSH private key matches the private key you see in the Key Name column for your EC2 instance in the console. In the Key Name column, verify the name of the private key that you're using to connect through SSH: Find the EC2 instance that you want to connect to using SSH.ģ. Open the Amazon EC2 console, and then choose Instances.Ģ. For a complete list of appropriate user names, see Troubleshoot connecting to your instance. On your local machine, verify that you're connecting with an appropriate user name. Resolution Verify that you're connecting with the correct user name You're using the wrong private key when you negotiate an SSH session with an EC2 instance.You're not connecting with the appropriate user name for your AMI when you negotiate an SSH session with an EC2 instance.These errors might occur under the following circumstances: When using the PuTTY client, I receive an error similar to the following: PuTTY Fatal Error: Disconnected: No supported authentication methods available (server sent: publickey) OK Authentication with public key "imported-openssh-key" Please login as the user "ec2-user" rather than the user "root". connecting to my Linux instance using SSH, I receive an error similar to the following: Using username "root".you go by train and have a high latency), you should choose a higher value for ServerAliveCountMax to allow ssh to keep trying to reestablish the connection. If you are more interested in keeping an already established connection (e.g.If you would like to quickly terminate the session as soon as the server does not respond anymore, you should choose a low value for ServerAliveCountMax. ![]() To make it persistent write it to /etc/ssh/ssh_config (will apply system-wide) or ~/.ssh/config (will apply user-only): ServerAliveInterval 60Īs dislick correctly pointed out, this might not what you want, depending on your situation: Therefore you should consider to set ssh -o "ServerAliveInterval 60" -o "ServerAliveCountMax 120" ![]() 2 hours of trying to keep the connection alive, you can do: The default value of ServerAliveCountMax is 3 (see manpage ssh_config).Įxample: If you set ServerAliveInterval to 60 and leave ServerAliveCountMax as it is, this means the keepalive will only wait for 3 * 60 = 180 seconds = 3 minutes before quiting.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |