Can't ssh into instance after reboot

dreamcompute

#1

I setup an instance with a keypair, then on my client machine setup an ~/.ssh/config file with the recommended fields to connect to the default ‘centos’ username for the CentOS 7 image I started with. All was going well with connects and disconnects, but then I had a problem with dovecot getting segmentation faults. I tried to remedy this with a general update (‘yum update’) followed by a soft reboot. After the reboot I can no longer connect using the default ‘centos’ username, nor with the other username I had created.

What I get is the following:

% ssh myinstance
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
% cat ~/.ssh/config
Host myinstance
HostName 208.113.123.321
Port 22
User centos
IdentityFile mykey.pem

The above are not the real Host, HostName or IdentityFile values, they are for illustration. What is true is that the real values worked before the reboot and did not afterwards.

Any suggestions?

As you might guess, I am trying to setup a postfix email server in a dreamcompute image that will take the place of my CentOS 6 box at home. the dovecot package needs to work in order to supply the outbound SASL authorization as well as the imaps service.


#2

Never mind – I solved my own problem.

Apparently the .ssh/config file I had made didn’t work right, because when I used:

ssh -i ~/.ssh/mykey.pem centos@208.113.123.321

the connection was successful.