Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

undefined_variable's avatar

Cant ssh into Forge aws server

hi,

Yesterday ive fired up a new aws server in forge, I have used the forge deploy tool to pull the site from git, no problem, site is up.

But I can not ssh into it.

Im using login : forge

I have added the public key, and Ive tried adding the key 3 different ways in forge ssh keys section

1: completely as it looks.

2: I have tied adding only the characters without these lines

---- BEGIN SSH2 PUBLIC KEY ----
(coment: "rsa-key....) 
---- END SSH2 PUBLIC KEY ----

3: and lastly Ive tried adding without the above comments and just the characters whilst removing the new lines, so adding as 1 long string.

But I always get from putty

Server refused our key.

and then a popup

Disconnected no supported authentication methods available (server sent: publickey)

So what have I forgotten to do?.

I can putty into my other forge vultr server no problem.

0 likes
4 replies
undefined_variable's avatar

Ive just fired up another server on forge at vultr,

Ive made a new key pair

ive added the public key to the ssh section and forge

Ive tried using putty to log in using the private key and usersname 'forge'

And I get key refused.

Im obviously forgeting some cruicial step here.

any ideas anyone please.

francoboy7's avatar

You and I will be able to retire in a really spacious cardboard box. I'll even invite you over for a beer.

wlake's avatar

Hello I have the same issue, the ssh keys are good. Aws got disconnected from forge and not able to reconnect again. This is my 10th attempt, I am not sure what went wrong. The log here

Nov 4 00:53:03 ip-10-0-1-156 sshd[78247]: Received disconnect from 74.122.209.251 port 46916:11: Bye Bye [preauth] Nov 4 00:53:03 ip-10-0-1-156 sshd[78247]: Disconnected from invalid user admin 74.122.209.251 port 46916 [preauth] Nov 4 00:53:04 ip-10-0-1-156 sshd[78249]: Invalid user admin from 74.122.209.251 port 46938 Nov 4 00:53:04 ip-10-0-1-156 sshd[78249]: Received disconnect from 74.122.209.251 port 46938:11: Bye Bye [preauth] Nov 4 00:53:04 ip-10-0-1-156 sshd[78249]: Disconnected from invalid user admin 74.122.209.251 port 46938 [preauth] Nov 4 00:55:27 ip-10-0-1-156 sshd[78265]: Invalid user from 65.49.20.69 port 52172 Nov 4 00:55:31 ip-10-0-1-156 sshd[78265]: Connection closed by invalid user 65.49.20.69 port 52172 [preauth] Nov 4 00:57:06 ip-10-0-1-156 sshd[78268]: error: kex_exchange_identification: Connection closed by remote host

Please or to participate in this conversation.