Unable to connect to amazon server using putty - amazon-ec2

I am trying to connect to EC2 server using putty with the help of .pem. It is giving me an error:
Disconnected: No supported authentication methods available (server sent: public key)
I have created a .ppk through puttygen. Still facing the same problem.
Can any one help me with the solution.

This usually means that there was a problem with how the pem file was converted to a ppk file, or that the pem file was not the right one to begin with. Make sure you followed the instructions for using puttygen correctly. There is an example here: Convert PEM to PPK file format
Alternatively, use a windows ssh client that uses pem files directly. Two options are:
Cygwin - it includes an ssh command line client.
Poderosa

U need a private key to connect to the server, the key U have probably is a public key, so U need to generate a private key in puttygen.

Perhaps, you use Ubuntu AMI. Should be user name - ubuntu.
Link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectingPuTTY

For those searching, I had this issue but the latest authentication method was not supported by the old version of Putty. Upgrading Putty allowed me to connect.
I downloaded the latest Putty from the official website of Putty; then it required to uninstall, so I backed up by finding the key in the registry for:
HKEY_CURRENT_USER > Software > SimonTatham
By clicking on that entry and choosing File > Export and saved to desktop, this contains all the data and settings for Putty should something go wrong during uninstall.
Now with Putty backed up, you can uninstall Putty (CCleaner is a good option), and when it asks if you want to remove the sessions click NO, otherwise it will wipe the data, but fortunately you have the data backed up to the registry by this point.
Finally, now you can install the latest version of Putty. The latest version of Putty has the necessary authentication methods that AWS uses.

Related

I can't access my bitnami server using ppk

Can someone help me fix this issue. I am connected few hours before but then when I tried to rename a folder using Putty I got disconnected and got this error.
Error: Disconnected: No supported authentication methods available (server sent: publickey)
I've tried the following solutions I got from the net.
- Re-gen private key
- Convert .pem to .ppk
- Move .ppk to other folder that all user has permission
- Use the ff username user,root,bitnami,ec2-user
- I tried it in Cyberduck, Winscp, filezilla, Putty
Thank you I hope someone can help me.
bitnami developer here.
Depending on which platform you are working you could download again the .pem file in order to connect to your server.
If you are working on any of our launchpads (https://aws.bitnami.com/, https://google.bitnami.com/, etc.) you have the option
to download you .pem key, so it's not necessary to regenerate the key.
On the other hand, if you are working on the amazon ec2 console and you did not download the private key pair of your server in the moment of the creation of the machine you won't be able to connect to it again unless you create another machine.
In order to reconnect to the server you should download again the key files and use it with putty/filezilla/etc. Make sure you put the correct ip of the server or you won't have access to it.

How to connect to AWS EC2 instance using filezillla?

I have AWS EC2 instance. I am using filezilla 3.8.0 but I cannot connect instance, filezilla doesnt accept account type normal and asking password. When I type user name ubunbu and password blank I received following message:
Disconnected: No supported authentication methods available (server sent: publickey)
I inserted pem key and converted ppk key also. My staff can connect but I cant. What is wrong?
Thanks
It happens in AWS EC2. As EC2 provide Connection through an SFTP need some other methods.
Firstly the CONNECTION will be in FTP as default. Need to change to SFTP.
Then instead of directly giving host name and password, it must be done in Site manager. Step by step procedure given below:
So the steps for troubleshooting:
Go to Filezilla's Settings
SFTP
Add Key File (Give the ppk converted key file or FZ will convert the pem ket)
Then take File in Filezilla
Go to
File
Site Manager
New Site
Give any name (ec2-amazon)
In General, give host name 'Public DNS' (eg: ec2-34-423.ap-southeast...)
Change the Protocol to SFTP
Logon Type: Normal
User : ec2-user or ubuntu - depends
Clear Password
Connect!
Hope you will be connected. Happy Hosting...:)
More specifically here's a screenshot of the dialog where you are supposed to add your ssh private key.
Try the following configuration in filezilla,
set Logon type = Interactive,Protocal = SFTP, and attach keyfile to filezilla SFTP setting from MenuBar -> Edit -> Settings ->SFTP -> Add Key File.
Hope this helps.
I was facing the same problem-
I follow up #Amith Ajith answer but found my setting was as it, is.
I choose a file as privatekey.pem which i generated.
Change "Transfer setting" as active
it worked for me.

Git on Windows - How to authenticate with remote repo on Linux

Due to some serious problems with a Git repo on Windows over HTTP, we're moving our Git 'server' to Linux.
Assuming I have already the msysgit for Windows installed and Putty, how will I authenticate the SSH connection when I clone, pull and push?
In case of SSH:
on the server, you'll need to allow authentication with public and private keys, you can google how to do it, for example http://shapeshed.com/setting_up_git_for_multiple_developers/
on the client, just put your private key into .ssh folder in your windows home, for example C:\Users\Name\.ssh, much like on unixes.
You can still use HTTP, it will either (1) always ask for username and password or (2) you can also put username and password into the URL: https://username:password#git.mydomain.com/...
This page has everything covered about using PuTTy for Git public key authentication.
In short:
Generate keypair with puttygen
Put the public key in server
In your local computer, set GIT_SSH environment variable to point to plink.exe
Run putty pageant and load your private key there
I recommend working through this tutorial.
The caveat is that it talks about github, so the story of telling the server about your SSH key is different.
What's also different is how do you intend to manage your developers.
The "problem" is that SSH operates with real remote (server-side, I mean) users, which have to have regular Unix system accounts.
This is okay if you have just a handful of developers. You then just need to add all of them to a special group (say, devel) and make sure you initialize your server-side bare repos using git init --bare --shared=group and make them group-writable and belonging to that group devel (this might also be helped out by creating all the repos under a directory which has its "group sticky bit" set and belongs to that group devel).
To distribute the public part of a developer's key to the server in such a setup you have to literally copy and paste that key part (from the developer's id_rsa.pub file, it's ASCII) to the file /home/developer/.ssh/authorized_keys file. If that file does not exist, create it.
If the key was generated on a machine with OpenSSH client installed, you can transfer the key using the ssh-copy-id program, in one step.
This might become messy, so you might consider implementing a solution which virtualizes Git users (like github does). There are plenty to choose from:
gitolite — supposedly the most popular solution. No frills, is administered using a specialized admin Git repo holding the developers' public keys and a configuration file describing the repos and permissions on them. Plain Perl, installable as a package on most sensible distros.
gitlab — a turn-key all-in-one solution. Written in Ruby, so you might face maintenance nightmares.
gitblit — another all-in-one solution, written in pure Java (note that it does not call out to vanilla Git and uses a pure Java Git layer — JGit).

HowTo: Teamcity + GitHub

Has anybody successfully configured Teamcity to monitor, extract, and build from GitHub?
I can't seem to figure how where and how to configure the SSH keys for Teamcity. I have Teamcity running as a system service, under a system account. So where does Teamcity stash its SSH configuration?
EDIT
To get this to work, I needed to stop the agent from running under a system account.
Ok... I got this to start working on my Windows server. Here are the steps I took to configure TeamCity 4.5 Professional:
Downloaded the JetBrains Git VCS Plugin
Copied the downloaded zip file to .BuildServer\plugins
In the Administration > Edit Build Configuration > Edit VCS Root configuration screen, I selected "Git (JetBrains)"
Entered my Clone Url from the GitHub project page
Set for authentication method "Default Private Key" -- this is IMPORTANT
The TeamCity BuildAgent should be running as a standard user, with the SSH installation configured properly for that user.
Follow the GitHub SSH directions for SSH configuration
Leave the username blank. This should already be provided for in your GitHub clone URL
I got "Default Private Key" to work with agents running as the SYSTEM user on Windows. For me, the answer was having the identity file at
C:\Windows\SysWOW64\config\systemprofile\.ssh\id_rsa
instead of at
C:\Windows\System32\config\systemprofile\.ssh\id_rsa
Your question is specific to SSH, but it is certainly easier and quicker to use HTTP over TLS, as GitHub and TeamCity both now support HTTP authentication. Furthermore, GitHub also supports personal api tokens with limited permissions, that you may configure to your liking, or create a new user if you prefer.
See image below of our TeamCity settings.
Since TeamCity 8.1, there is an official support for SSH key management, please read this docs: https://confluence.jetbrains.com/display/TCD9/SSH+Keys+Management
for private key, username must be blank.
(This is a up to date answer to an old question)
I got ssh based builds working with github/gitlab and teamcity 7 like this:
Log onto the teamcity machine and use puttygen/ssh-keygen to generate a rsa key pair and save the openssh key somewhere sensible.
(Gotcha - Using puttygen? Make sure the private key is in openssh format - puttygen > conversions > export openssh key)
I suggest you save the private key in
C:\.ssh\id_rsa
Now setup "default private key" in teamcity - create a file
C:\.ssh\config
And in it place this:
Host * IdentityFile c:\.ssh\id_rsa
Login to your gitlab/guthub account and paste in the openssh public key for your teamcity private key.
You should now be able to create a git vcs root in teamcity that can use the default private key to pull your source.
You may need a third party plugin like this
I don't know why but choosing Default Private Key failed to me.
Then I choose to Custom Private Key as screen shot below:
The Username field has to be empty.
The Passphrase field is the password of the your private key
(Assume you have added the public key of this private key in git already.)
Hope no one got stuck like me !

ec2 putty connect problem

I have followed Amazon instructions to the letter and it does not work.
ec2-api-tools-1.3-34128 - this is the api tools that I got from Amazon
Set it up following instructions. Checked everything to make sure I follow instructions. When I try to use it, I only get: "invalid.blabla" depending on what command do I try to use.
Anybody with this problem?
I deleted all my instances and all key pairs.
Created new ones (instance and key pair).
Setup putty all over again like instructions say I should do
(creating .ppk file and everything).
Still the problem remains.
When I try to connect to my ec2 instance using putty
I get "login as : " ????????
Also, I am using windows vista.
Is this a problem.
Thanks
Had this same problem. I found that in putty I had to do three things (only 2 of which are mentioned in the amazon guide at http://docs.amazonwebservices.com/AmazonEC2/gsg/2007-01-19/putty.html)
provide the converted private key in the ssh -> Auth section
provide the dns name or IP
go to Connection -> Data and enter "ec2-user" as the Auto-login username
Hope this saves someone else 20 mins!
Did you make sure that you put "root" as the auto-login account in the "Data" section?
A mistake I made than gave me the same error message was setting
"root#ec2-.eu-west-1.compute.amazonaws.com" as the value in the "Host Name (or IP Address)" field in putty.
You need to specify "ubuntu#ec2-.eu-west-1.compute.amazonaws.com".

Resources