'SSH permission denied (publickey) - Laravel Forge
I have followed Jeffrey Way's instructions and I am continuously getting the same SSH error within Terminal.
I am wanting to connect through Sequel Pro and upon digging further into it, this is the most accurate log description:
debug1: Host 'IP ADDRESS' is known and matches the RSA host key.
debug1: Found key in /Users/ben/.ssh/known_hosts:17
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/ben/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering RSA public key: /Users/ben/.ssh/id_rsa.pub
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
I generate my SSH key this way:
ssh-keygen -t rsa -C "[email protected]"
Then copy it into Laravel Forge by:
cat ~/.ssh/id_rsa.pub | pbcopy
It saves without error. But then I try forge@ip_address and it returns the Permission denied error, always.
Any help would be hugely appreciated.
Solution 1:[1]
I solved this problem by recreating the server on Forge. pbcopy
also failed to work.
Solution 2:[2]
I had the same problem follwing the instructions.
Try:
pbcopy < ~/.ssh/id_rsa.pub
Solution 3:[3]
If you added your key from the Forge "Account" > "SSH keys" page after creating your server, you'll need to also add your key here:
- Servers > [your server name] > SSH keys > Add
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Matthew McMullen Smith |
Solution 3 | clem |