[RESOLVED] How do i connect to my new server?


#1

I created an SSH key on my mac, I added it to the credentials section of scaleway, I created new ubuntu server but I am not able to log in because it keeps asking me for a password, i followed the tutorial here https://www.scaleway.com/docs/create-and-connect-to-your-server/
but it keeps on asking me for a password, I deleted my server instance, created a new one and still keeps asking me for a password. WHat is the password?


#2

Did you have something like “pageant” on MAC ? :slight_smile: you have to have your SSH key loaded in order to log into the server.
There is no way to set a password whitout creating first a SSH2 key and
log into the machine, then -> change your ssh config to allow
root/users to log in without SSH key and set a password for each users.


#3

How do I load the SSH key? I did not read anything about loading ssh keys on the tutorial.


#4

Here sir (in “account” in the top-right) :


And then you paste it here :

I hope this help you :stuck_out_tongue: !


#5

You can find some useful documentation here https://www.scaleway.com/docs/configure-new-ssh-key/ https://www.scaleway.com/docs/create-and-connect-to-your-server/


#6

I mentioned in my question that I already added the SSH key on my account. But when I try to log-in from the terminal using ssh root@serverIP it asks for a password. From what I understand I dont need a password if I have SSH keys. I followed every documentation available on scaleway website but cant find a solution.


#7

Have you rebooted your server? If you added the key while the server was running you have to restart it to sync the keys.


#8

I added the SSH before creating the server, rebooted the server, deleted and created new server, I keep getting the password request.


#9

Are you trying with the following command ssh -i <path/to/your/private.key> root@<server_ip> ?


#10

Yes, I followed every step on this tutorial https://www.scaleway.com/docs/create-and-connect-to-your-server/
and it still asks for a password.


#11

It is asking for a password because you are not entering root as your username. If you enter root you will not be asked to create password.


#12

No I did enter root as my username, there is no other option, it keep saying the fingerprint has changed, how did the fingerprint change? Why would the fingerprint change?


#13

I had the same issue today, in my case, it turns out that the machine I was connecting to didn’t accept ecdsa keys, for reasons I have yet to understand. When I tried with either a rsa or a ed25519 key, it worked fine.

If you add a -v, for verbose, to the ssh command “ssh -v -i …” then you’ll get more details about what ssh does, and hopefully this will explain why it fails to use the ssh-key. Try that, and post the output here. :slight_smile:


#14

I’m having the same exact issue here and I haven’t solved it. I did reboot my server I’m on a mac and I cannot access my server. SCALEWAY UPDATE YOUR TUTORIALS, PLEASE!!


#15

Hi guys,

Make sure your SSH client is trying to authenticate WITH your public SSH key.
If there aren’t any other technical issues, chances are that if your server is asking for a password is because no SSH key is being sent from your client.


#16

I have the same problem. I have been using a debian stretch image for one year, which was debian testing at the time. Now I added a new server with debian stretch stable and I cannot login on the server with the same command line, it asks for a password. I did not change my credentials on the user account.

Here’s a ssh -v:
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4p1 Debian-10
debug1: match: OpenSSH_7.4p1 Debian-10 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.1.12.246:22 as ‘root’
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:hmy/dBLz77ViOSHB7xUKfu/wVMBo2XCPmsI2vxQTja0
debug1: Host ‘10.1.12.246’ is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:3
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/my_id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: Next authentication method: password
root@10.1.12.246’s password:


#17

After a long exchange with the support, it turned out that old keys are not taken into account in new servers. Adding a new key in the credentials of the user account allows a connection to be made with it to a new server.


#18

Just had the same surprise myself today.
@vinvin Can you please elaborate on what it means “old key”, if you found out, I mean?

Does it mean that if I add a pub key in the Credentials, then deploy and boot a server, I will not be able to use the keypair I just added?
Because if the above is true, then the alternative is:

  • deploy a new instance
  • add a new key in Credentials
  • reset the instance to reboot it so that it gets the newly added key, as there is no way to ssh in and do a clean reboot, and no way to soft reboot from the control panel.

That just seems wrong.
Am I missing something here? 10x


#19

Hello vch, I have no clue on what is considered to be old for scaleway, but mine was at least one year old. I don’t think you need to add it after the creation of the instance, but maybe I’m wrong. There are issues with their system, and it is often unclear what fails. And yes it seems wrong anyway.
Good luck!


#20

Thank you, @vinvin !
I had the same issue, and it turned out that Scaleway doesn’t accept old 1024-bit RSA keys.
When I load my key in “Credentials” tab, it just took it as correct without any warnings.
After generating a new one (2048-bit RSA) it started to work.

Dear Scaleway, please UPDATE your documentation!