DigitalOcean Guide followed:
stderr=mux_client_request_session: session request failed: Session open refused by peer [email protected]: Permission denied (publickey).
@Brian I followed these ^ steps, #3 failed for me too.
- Confirmed I had
config
file params set.
- I then followed @richard.amaya's insight.
- Port 22 was limited for me as well, I opened. Also 80 and 443 weren't explicitly listed so I opened (directions say we don't have to with droplet but
sudo ufw status
didn't show them). Reloaded via sudo ufw reload
, killed local terminals, re-opened, same issue.
- Confirmed remote
~/.ssh/authorized_keys
matched local (although I shouldn't even be allowed inside the remote server if they didn't match).
- Ran
ls -ld ~/.ssh/
to confirm read, write, execute permissions; fine.
- Ran
ls -l ~/.ssh/authorized_keys
for read, write permissions; fine.
- Ran
nano /etc/ssh/sshd_config
and saw #PubkeyAuthentication yes
so I uncommented, restarted ssh service sudo systemctl restart sshd
, killed terminals, then tried #3, same Permission denied (publickey)
.
The only other minor item is I'm doing to keep local separate from cloud deployment.
mkdir ~/quantrocket_cloud
docker --context cloud compose -p quantrocket_cloud up -d
I do have a passphrase on the SSH Key. I tried:
eval $(ssh-agent)
-
ssh-add ~/.ssh/my_private_key
; same error.
I have a Reserved IP in DigitalOcean, again don't think that matters, just writing for completeness. I changed the create cloud
to the original IP I was given, but got the same result.