SSH Login Not Working
When I try to ssh into my server as below
ssh [email protected] -i ~/.ssh/id_rsa.pub (Not the atual IP address)
I get the error below
ssh_exchange_identification: Connection closed by remote host
I contacted support on Laravel Forge and have been advised to use the private key. How do I do that? I am only familiar with using the public key.
You have two keys:
id_rsa.pub --> public key
id_rsa --> private key
when connecting to the server, you need to use your private key
so you ssh command would look like this:
ssh [email protected] -i ~/.ssh/id_rsa
just remove the .pub at the end
Do you have the private key?
Hi @mushood
Thanks. Yes, I have the private key. I have tried it but the connection is just timing out.
Make sure that the key is enabled for connection on the server
Also make sure that bash access is enabled on the server
For the command the structure is usually like this
ssh -i path/to/privatekey [email protected]
I have the public key enabled in Laravel Forge. I don't know where or if I am also suppoed to enable the private key.
I think bash access is enabled on the server because I was able to connect before.
The problem started when there was a process on the server that just spiked all of a sudden to 100% or near 100%.
@temwa
I think the best bet is to talk to forge assistance. They are usually responsive.
@mushood , Thank you. I have contacted them and got several responses. Thanks for your help.
Please or to participate in this conversation.