New SSH key in cloudbees - openssh

I'm creating a new SSH key with my account in Cloudbees. In public key box, i gave
ssh-rsa <key> user#publicIP.com
but this shows "could not be fingerprinted". I'm new to Cloudbees, can anyone help me in this?

My guess would be that your SSH key is invalid.
You can test your key using
cat > file.pub <<EOF
ssh-rsa <key> user#publicIP.com
EOF
ssh-keygen -l -f file.pub

Related

failed to push the branch to the remote repository

Hello I am trying to push an branch in visual studio there is an error :
When I tried the following windows is shown:
and
I have inserted my credentials but without success.
Is it other way o solve this issue?
You might as well using the git cli.
First you need to create an SSH Key.
--- Linux :
ssh-keygen -t rsa -b 4096 -C "yourGitHubMail#youmail.com"
press 'Enter' a a couple of times
after that you should get a success message.
copy your id_rsa.pub
cat ~/.ssh/id_rsa.pub
--- Windows :
Create folder if exists, and create SSH Key
mkdir /Users/username/.ssh && cd /Users/username/.ssh
ssh-keygen -t rsa -b 4096 -C "yourGitHubMail#youmail.com"
Copy the code was outputed.
Go to you github page and press 'Settings' => 'SSH and GPG Keys'
Click 'New SSH Key'
in the test area under 'Key', paste in your SSH key.
You shoul generate an application password (access token) in GitHub and filling it in instead of your password and it will works ! Doc here

Openssh Private Key to RSA Private Key

(I am using MAC)
My id_rsa starts with
-----BEGIN OPENSSH PRIVATE KEY-----
but I expect it to starts with
-----BEGIN RSA PRIVATE KEY-----
I have send my id_rsa.pub to server administrator to get the access to server, so I don't want to generate a new key.
Is there any way that I can transfer my id_rsa which is a openssh private key to a RSA private key? (command please.)
If I can transfer, do I also need to transfer id_rsa.pub? (command please.) It seems id_rsa.pub doesn't have a header like id_rsa, so I am not sure if I should also transfer this.
You have an OpenSSH format key and want a PEM format key. It is not intuitive to me, but the suggested way to convert is by changing the password for the key and writing it in a different format at the same time.
The command looks like this:
ssh-keygen -p -N "" -m pem -f /path/to/key
It will change the file in place, so make a backup of your current key just in case. -N "" will set the passphrase as none. I haven't tested this with a passphrase.
The public key should be fine as is.
For full explanation of the above command, see the -m option here: https://man.openbsd.org/ssh-keygen#m
Here's what worked for me for an in-place conversion of a key with a passphrase:
ssh-keygen -p -P "old passphrase" -N "new passphrase" -m pem -f path/to/key
Install and open puttygen
Click on "Load an existing private key file"
Click on menu item "Conversions" -> "Export OpenSSH key"
Save file
You can achieve this easily if you can get your hands on a linux system. I am using ubuntu 18.04 and did the following:
update packages: sudo apt update
install putty: sudo apt install putty
install puttygen: sudo apt install putty-tools
convert the private key to the intermediate format SSHv2: puttygen yourkey -O private-sshcom -o newkey
convert it back to RSA/PEM: ssh-keygen -i -f newkey > newkey_in_right_format
And you are good to go
Some of the answers above didn't work and I actually ran into yet another problem when trying to create a RSA private key from the OpenSSH private key using ssh-keygen command: unsupported cipher 3des-cbc. A helpful gist for that problem can be found here: https://gist.github.com/twelve17/0449491d86158960fdb630160799ff23.
The following command worked for me to create a valid and working RSA private key from a (Putty on Windows generated) OpenSSH key using:
$ sudo apt install putty-tools
$ puttygen existing_key.ppk -o id_rsa -O private-openssh
# enter passphrase if needed

keep getting error /Users/newuser/.ssh/id_rsa: No such file or directory when trying to connect to ssh agent. Any idea what Im doing wrong?

I'm following the github instructions on how to set up ssh key and add it to the ssh agent. However after I input ssh-add -K ~/.ssh/id_rsa into the terminal, I receive this error: /Users/newuser/.ssh/id_rsa: No such file or directory
I set up my ssh key using Enter file in which to save the key (/Users/newuser/.ssh/id_rsa) so I believe its the correct name.
Any help would be appreciated!
I have been following the same instructions and meet the same problem. This is what worked for me:
cd ~/.ssh
ssh-add id_rsa
Enter file in which to save the key (/c/Users/YOURNAME/.ssh/id_rsa): id_rsa
Use the key in id_rsa.pub to add SSH Key
$ ssh -vT git#github.com
Screen will display:
You've successfully authenticated, but GitHub does not provide shell access.

Setup SSH keys but server still prompts for password?

ssh localhost
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
i followed all above steps in my teminal for disable the password to start the hadoop services ($start-all.sh) but it is still asking for password please anyone help me to disable password..
Please refer the below link to setup password less ssh it has a best example to get more clarity on ssh setup
https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/
Hope this Helps!!!..
I had a world of problems with permissions and the .ssh directory.
I think the permissions had to be 600 too but I can't remember exactly.
Good luck
If you are doing a multi-node setup, all the nodes must be able to communicate with one another without password. On each node, you generate SSH keys. For example using this command :
ssh-keygen -t rsa -b 4096 -C someemail#.example.com
Then you replicate the keys to all the nodes :
ssh-copy-id hadoop#master
ssh-copy-id hadoop#slave-01
ssh-copy-id hadoop#slave-02
etc.
This needs to be done on each node (every node should have all the keys).
Hope this help !
It worked for me.
Use ssh-keygen on local server to generate public and private keys.
$ssh-keygenEnter passphrase (empty for no passphrase):
Enter same passphrase again:
the ssh-copy-id copies public key to the remote host
ssh-copy-id copies public key to remote host
Use ssh-copy-id, to copy the public key to the remote host
ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.200.10
Perform rsync/SCP over ssh without password**
Now, you should be able to ssh to the remote host without entering the password.
ssh 192.168.200.10
Perform the rsync again, it should not ask you to enter any password this time
rsync -avz -e ssh /home/Sangita/ sangita#192.168.200.10:/backup/Sangita/
or
scp /home/Sangita/ sangita#192.168.200.10:/backup/Sangita

ssh-keygen error: Passphrase is too short

I was trying to install hadoop on my system in which I need to configure SSH to access to localhost. But while generating the keygen using the command
ssh-keygen -t rsa -P --
But while generating this keygen I got the following error
anamika#Alex:/home/alex$ cd
anamika#Alex:~$ ssh-keygen -t rsa -P --
Generating public/private rsa key pair.
Enter file in which to save the key (/home/anamika/.ssh/id_rsa):
Created directory '/home/anamika/.ssh'.
Saving key "/home/anamika/.ssh/id_rsa" failed: passphrase is too short(minimum five characters)
anamika#Alex:~$ exit
alex#Alex:~$
What is passphrase here? Also I tried to give some file name to save the key but still it didn't work.
Looks like you are mistakenly writing hyphen in place of double quotes in the second line:
anamika#Alex:~$ ssh-keygen -t rsa -P --
replace the above with the following
anamika#Alex:~$ ssh-keygen -t rsa -P ""

Resources