(I have already seen other related answers in Stack Overflow, not helping, I may be missing something out)
I am getting this error after adding my SSH key to GitLab:
The form contains the following errors:
Key is invalid
Fingerprint sha256 has already been taken
Fingerprint sha256 cannot be generated
Key type is forbidden. Must be RSA, ECDSA, ED25519, ECDSA_SK, or ED25519_SK
This is my key generated from command prompt :
AAAAB3NzaC1yc2EAAAADAQABAAABgQDJKcaE7AZRIpFcRkobZBVSvBSscOdgHP5I5zV0gMA2jOIxV/3lOgf8vZ7rXWld/4bBNkCREM7JXs1IFZRrfSXgC2UocDpDWwnduUx8bGsZsfH1tfLLLU42lQgqMs5Aw+3zV4vlX9NpXGqSXtUXEbxQ18B9cv43I4Wg/9af9ADi8x27+xg6/f1jjL6pTVGySMceOyM0ZBpESbjwk66n4tzWlaVmn7c6OIDwlfz0K/ky/ozIBqwpFTDD72yCMgihWZSJiR2nIlhLPVwEKld0xfnstiludFdtHvt0U8tvyZjL6pTVGySMceOyM0ZsletaOaaKN+Pvq5pGMafcZyN/uMM63QHOwSPloaV9JFQ2hbT/7D8tmxojBGSLW5PlG+A1QxxBZHGYgFpz/ooIJNrjrkc7DFcn60jaGKeuDxXNXuOXhyCz4xVWNxAB7XdCurDYI/1YuFmXFDpkUhKCZM3cFBpfRZ78ScyQ0q/kSJygnuBULgPmcmKEg3VLj6C2Cuu3hiCjs0jgX8ltCHZ61E8U=
COMMAND:
ssh-keygen -t rsa -C "taha.gh1985#gmail.com"
Make sure to copy the full public key part of what ssh-keygen has generated.
In your case, the public key should start with ssh-rsa AAA....
I mentioned before a similar error, where the key was incomplete.
Note: the GitLab error message "Fingerprint sha256 has already been taken" has been reported as "not helpful enough": issue 377357.
RSA file :
ssh-rsa AAAAB3Nz.....61E8U= pasar#DESKTOP-9SMOQR
I removed begin and end of text and used it as key to GITLAB which was the reason why SSHKEY was wrong.
Related
I have a codespace provided by CS50. I want to ssh into it using my local terminal. I installed github-cli.
When I run gh cs list It shows the codespace :
NAME DISPLAY NAME REPOSITORY BRANCH STATE CREATED AT
roshanpaudel111-literate-space-sniffle-g6x64ww79x9cvgg9 literate space sniffle code50/65642985 main Available 6d
But when I try to ssh into it using this command gh cs ssh roshanpaudel111-literate-space-sniffle-g6x64ww79x9cvgg9, it shows the following output:
? Choose codespace: code50/65642985 (main): literate space sniffle
ubuntu#localhost: Permission denied (publickey,password).
shell closed: exit status 255
How can I solve this issue?
The whole process looks like this :
linux#linux ~ $ gh cs list
NAME DISPLAY NAME REPOSITORY BRANCH STATE CREATED AT
roshanpaudel111-literate-space-sniffle-g6x64ww79x9cvgg9 literate space sniffle code50/65642985 main Available 6d
linux#linux ~ $ gh cs ssh roshanpaudel111-literate-space-sniffle-g6x64ww79x9cvgg9
? Choose codespace: code50/65642985 (main): literate space sniffle
ubuntu#localhost: Permission denied (publickey,password).
shell closed: exit status 255
linux#linux ~ [1] $
Double-check the format of the private key you registered in GitHub Codespaces.
It should start with -----BEGIN OPENSSH PRIVATE KEY----- and ends with -----END OPENSSH PRIVATE KEY----- (meaning a non-encrypted private key)
The EOL (end of lines) used in that file should be LF (not the Windows CRLF), although if you copy-pasted its content directly, it should be fine.
See also the process followed in cs50/codespace issue 62.
The OP Rosan Paudel adds in the comments:
I think it works with the codespaces that we create manually.
I was trying to ssh into a codespace that is provided by cs50 which is in my repository.
Whenever I run update50 it screws up everything. So I have to backoff doing any tweaks.
My company uses ed25519 and nodejs version 10. I see the error,
"
I deleted the keys from the .ssh( this i was fine since I am starting to build new) and regenerated adding the -m pem option as I copied the .pub contents to my app for validation.
I still see this error.. Is there anything I am missing? or is it picking up the old keys from somewhere?
Any pointers would greatly help me..
thanks
I am having some issues while trying to setup a paramiko scp using private public keys.
The problem is not so much related to the paramiko itself, I think, but the fact this is launched in a Cron (user cron (crontab -e)).
So the script works from the normal terminal, but it does not from the cron. I tried to specify the exact location of the private key (key_filename="/home/myuser/.ssh/id_rsa") when calling the method connect. It returns back the following error: "Not a valid RSA private key file".
On the other hand, in the cron, I tried to declare the terminal to use:
SHELL=/bin/bash
PATH=... (all the typical values)
HOME=/home/myuser
Also tried to source the $HOME/profile prior to launching the task.
It keeps failing.
Either making the cron execution environment to have all the variables as a normal bash or being able to properly specify to paramiko the location of the private key would make it, but all the things I tried did not work.
I also tried: Paramiko can not access private key
But it did not work.
And this problem Paramiko: "not a valid RSA private key file" is not applicable, because the script works when launched from a normal terminal with that user. It fails with the cron.
Any clue?
Python3
Paramiko 2.6.0
Ubuntu 20.4.2 LTS
Thanks to Martin Prikryl, after activating the paramiko logging, which reported an error about something not implemented I ended here:
Getting Oops, unhandled type 3 ('unimplemented') while connecting SFTP with Paramiko
By applying the private key as per that post (and making a conversion as per this other post: Paramiko: "not a valid RSA private key file" Note I am using the Paramiko 2.6.0)...
Now it works!!
Thanks, Martin!
Last night I setup Pass Password Manager. I used gpg2, and followed this tutorial. I didn't implement git integration. Everything worked successfully. To view my password I had to enter my master key, exactly like how I want it. This morning I try to use pass. In my terminal I typed in
pass account/adobe/my#email.com
I get the following error:
gpg: decryption failed: No secret key
It didn't ask me to enter my master key. I tried restarting gpg-agent, I tried editing ~/.gnupg/gpg-agent.conf, but nothing is working.
This is how my ~/.gnupg/gpg-agent.conf looks like:
default-cache-ttl 28800
# 8 hours
pinentry-program /usr/bin/pinentry-curses
allow-loopback-pinentry
I should mention that I am using Linux Subsystem on Windows 10.
I put this in ~/.gnupg/gpg-agent.conf :
default-cache-ttl 3153600000
pinentry-program /usr/bin/pinentry-curses
allow-loopback-pinentry
After enter the following commands:
$ gpgconf --kill gpg-agent
$ gpg-connect-agent /bye
I am trying to SFTP a Debian-7-Wheezy-V20140807 Instance on Google Compute Engine from Windows 7, 64 Bit Client.
Finally my problem got solved using this
Also in Windows I first installed Cygwin and then used set the Environment Variable CLOUDSDK_PYTHON to python instead of C:\python27\python.exe
and finally from cygwin ran this
curl https://sdk.cloud.google.com | bash
All the instructions below are symptoms. First i tried Filezilla, which errors out with message
Status: Waiting to retry...
Status: Connecting to 23.xx.xx.xx..
Response: fzSftp started
Command: open "Abdul#23.236.51.19" 22
Error: Disconnected: No supported authentication methods available (server sent: publickey)
Error: Could not connect to server
User :root
password :
<same as passphrase set up on running SSH key>
I have also tried gcloud compute copy-files
gcloud compute copy-files deccan4-clone:/etc/ssh/ssh_host_rsa_key.pub ssh_host_rsa_key.pub --zone=us-central1-b
ssh_host_rsa_key.pub: **Permission denied
ERROR**: (gcloud.compute.copy-files) exit code 1: /usr/bin/scp -i /home/Abdul/.ssh/google_compute_engine
sudo gcloud compute copy-files deccan4-clone:/etc/ssh/ssh_host_rsa_key.pub ssh_host_rsa_key.pub --zone=us-central1-b
WARNING: You do not have an SSH key for Google Compute Engine.
WARNING: ssh-keygen will be executed to generate a key.
This tool needs to create the directory /root/.ssh before being able
to generate SSH keys.
Do you want to continue (Y/n)? Y
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/google_compute_engine.
Your public key has been saved in /root/.ssh/google_compute_engine.pub.
The key fingerprint is:
root#deccan4-clone
**ERROR: (gcloud.compute.copy-files) some requests did not succeed:
- Insufficient Permission**
I have also tried
Abdul#deccan4-clone:/home/a_rahman_synergywell_com$ gcloud compute copy-files de ccan4-clone:test.txt test.txt --zone=us-central1-b
scp: test.txt: No such file or directory
ERROR: (gcloud.compute.copy-files) exit code 1: /usr/bin/scp -i /home/Abdul/.ssh
/google_compute_engine -r Abdul#23.236.51.19:test.txt test.txt
Please let me know if I am missing some key setup.