Capistrano Permission denied (publickey). with remote_cache - ssh

I've an issue with capistrano when I want to deploy via remote_cache.
It's works fine on :copy.
I got this error :
[ssh.alwaysdata.com] executing command
** [ssh.alwaysdata.com :: err] Permission denied (publickey).
** [ssh.alwaysdata.com :: err] fatal: The remote end hung up unexpectedly
I've well set up my ssh key on my server and on my github & bitbucket accounts … so I don't understand why there is an publickey issue.
Here his the repo of my test project : https://bitbucket.org/valentincaen/deploy_-remote_cache
Thanks,
Valentin

I've resolved the issue, I had simply a passphrase on my ssh key. I generated a new key without passphrase and it's working

Related

SSH Server connection issue From Ubuntu

I have a following issue while connecting staging server using SSH cmd.
My cmd -> ssh hostaddress
Error -> root#host: Permission denied (publickey).
I have setup .ssh folder , and generated keygen keys as well.
Thanks in advance.

Cloning private repository with cPanel SSH key throw error "permission denied"

I accessed my cPanel server via SSH with help of username#host and password.
Generated SSH key (RSA) and added it to my GitLab account.
When I tried cloning it shows me an error, fatal: Could not read from remote repository
I think this is an error from the cPanel side but not able to resolve, help me out
From your CPanel server session, check if your generated key works with:
ssh -Tv git#gitlab.com
If you don't see a Welcome to GitLab, #username! at the end, that means the key is not properly registered.

I try access via ssh the server

I tried:
$ ssh root#157.245.238.190
and I receive:
Warning: Permanently added '157.245.238.190' (ECDSA) to the list of known hosts.
Permission denied (publickey).
Why does the connection fails, even though I have added the server fingerprint to the known_hosts file?
While known_hosts might be correctly updated, you sill have to register (add) your public key to ~root/.ssh/authorized_keys on the server side.
If not added, an SSH connection would fail with Permission denied (public key)
Also check how the sshd_config is configured on your droplet.
Note that the recommended SSH session is using a user, not root.

ssh an Amazon instance permission denied (publickey)

I am a user on my local machine (clientuser1). I ssh into a AWS instance server (with ip: server-ip) as . I have the public key of clientuser1 uploaded in my permission settings.
I am able to
ssh <server-user1>#<server-ip>
I, then created a user on the instance, and tried ssh'ing into the instance:
ssh <server-user2>#<server-ip>
I got a response:
Permission denied (publickey).
I tried creating a public-private key pair on the on the server and sent the private key of
ssh -i <pvt key of server-user2> <server-user2>#<server-ip>
The answer that worked was
ssh-add <id_rsa>
This added the new key to ssh-agent.
For Googlers:
Other than the common permission-related causes, if the system disk is full, SSH server will also respond "permission denied".

SSH can't connect to Google Cloud

So, I just do trial GCloud service, and try connect via ssh. At the first time I forget my username of my Mac, so I did it wrong by doing this:
doe-MacBook-Pro:Documents does$ ssh -i ~/.ssh/google_compute_engine xxxx#111.111.111.111
Warning: Identity file /Users/does/.ssh/google_compute_engine not accessible: No such file or directory.
The authenticity of host '111.111.111.111 (111.111.111.111)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '111.111.111.111' (ECDSA) to the list of known hosts.
Permission denied (publickey).
then I know my username, I tried:
doe-MacBook-Pro:Documents does$ ssh -i ~/.ssh/google_compute_engine does#111.111.111.111
Warning: Identity file /Users/does/.ssh/google_compute_engine not accessible: No such file or directory.
Permission denied (publickey).
and it gives me error. Can you tell me how can I solve this issue?
This has nothing to do with the ssh username.
Check two things first and we can go from there:
Permission: should be readable by you, i.e., at least 0400.
File: does it exist at all?
Problem SOLVED!
I forget didn't completed my gcloud compute ssh project-name command.
After I finished with the command, it creates file google_compute_engine.
Now I finally can connect to my Google Cloud via SSH.