SSH Public Keys not working against CloudBees Repositories - cloudbees

I'm trying to use git as my repository, and I keep getting the error: Permission denied (publickey).
I've tried generating keys on my computer and placing the generated key in my cloudbees account as well as my known_hosts file.
I've also tried adding the key listed in the Jenkins job that I created in my known_hosts, and I'm still unable to connect.
I'm not really sure how to obtain the correct key or how/where to go about placing the key in the correct places.
Any help would be much appreciated.
Thanks,
Danny

There are a couple of things to try shown at http://wiki.cloudbees.com/bin/view/DEV/Git+-+Getting+Started#HTroubleshooting
That being said, it sounds like you're new to SSH, and the commands in the above FAQ may not help.
Generally speaking you will generate a public and private key pair. The public key (~/.ssh/id_rsa.pub / ~/.ssh/id_dsa.pub) will be pasted into GrandCentral as shown in the link above.

Related

GnuPG OpenLDAP key upload

I need your help.
I set up an LDAP keyserver on my Ubuntu VPS.
Uploading keys works wonderfully, but I'm facing a problem where I can't get any further.
I generated a public key via Gnu and uploaded it to the server.
Picture
That also works so far.
Now I create a new public key via Openkeychain. I also store my e-mail address in the key there. Then I upload it to the server.
Picture
But now I have the problem that the "pgpUserID" is missing.
Can you help me and tell me how to get this for the key? Is it because of OpenKeychain?
Or can I add them through a command on the server?
Please note that only the public key is available. The private key remains with the employee and is not on the server.

Bitbucket ssh key seems to "expire" after a few days

I have never had this issue before was hoping someone could help explain why this is happening, as I can't find anything online about it.
I was just given access to a new bitbucket project and account. When I first add my ssh key to my new account, I am able to clone things down easily everything works normally. For some reason though, after a few hours, I suddenly start getting Permission denied (public key) errors, and the only way i've found to solve it is to delete my previous ssh key and create a brand new one!
I am on a mac and I use ssh-keygen to create my key, and i always run ssh-add to add it to the agent. Then I delete the public key from bitbucket and create a new one with the new key's info, and it starts working again but only for a few hours!!
Is this a setting on the bitbucket i've been given access to? It doesn't seem to be as everyone I've spoken to that also has access does not have this issue. This has always been the way i've added ssh keys and I have no clue what I'm doing wrong.
Thanks!

gitLab: certificat issue, missing ssh public key

i can't get a point and understand how it works and what is necessary to do.
I have an account by GitLab and successfully generated private and public certificate in order to provide access to it. I done all steps as describes the https://gitlab.com/help/ssh/README#generating-a-new-ssh-key-pair . Now i decided to create a new project and synchronize the state between gitLab project and one i created local by me. Because i have access to machine, which i used to create both certificate, i simply copied the public key from one machine (located in ~/.ssh folder) to current machine i am working in (in ~/.ssh folder). But it doesn't take any effect. I can't even execute the git clone command.
~> git clone git#gitlab.com:[myUser]/[myProject].git
Cloning into 'gate-controller'...
git#gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
i tried to figure out the reason and executed
~> ssh -vT git#gitlab.com
but to be a honest i can't interpret that response. I don't see in response any reference to my public keys file in ssh folder.
Could you please support me to solved the issue and understand, what is the problem ?
many thanks in advance
UPDATE:
You need the private key on any machine you're attempting to pull/push from. When authenticating with a service that has your public key (which any git service like Github, Gitlab, etc. will have) you need to use your private key when authenticating.
You can read more about ssh (which git uses when you don't use HTTPS auth) and PKI (Public Key Infrastructure) here https://www.ssh.com/pki/

SFTP - From WinSCP to Terminal Access

I have been able to set up SSH access to my Google Cloud Platform VM via SFTP using WinSCP, but I now wish to do the same using another VM.
I have tried the ssh-keygen -t rsa , ssh-copy-id demo#198.51.100.0 method but always come up against the "Permission denied (public key)" error which from researching seems to be a pretty widespread issue with few reliable fixes (all the ones I tried didn't work).
I used PuttyGen to create the public and private key, and inserted the public key onto the server just through GCP settings, adding it under the SSH settings for my instance.
I am just confused on what to do with the private key when simply trying to sftp through the terminal on a separate VM, as before I would load the private key into WinSCP settings. Is there a folder I need to place it in or?
Regarding your first issue of "Permission denied (public key)" error, please follow the troubleshooting in this link and this.
About your other question of "what to do with the private key when simply trying to sftp through the terminal", that depends on the settings of the specific the 3rd party SFTP tool you are using. To locate the locations of SSH key after generating them, please review this document.
Once you have added the public key in the VM, you would need to boot the VM for public key to take effect. Try rebooting it and try

Multiple computers with same ssh Private and Public keys

I have about 12 computers with exactly same specs. These are used for my PoS on my business.
I am creating a customized Ubuntu ISO to improve installation time and automate things.
One issue I am facing is OpenSSH-server generated keys (Pub and private), must be generated after installation through command ssh-keygen ...
However, I have to pass explicit and plain-text password, which I would like to avoid.
I would like to know if I can share same private and public keys to everyone, so that I can remote connect on them?
In this way, I can generate keys only once and seed it through post-script installation using pressed.
One issue I am facing is OpenSSH-server generated keys (Pub and private), must be generated after installation through command ssh-keygen...
They are generated after the installation for a reason. And that reason is certainly that they should not go to anyone else (from there is the private word). But they are Host keys.
However, I have to pass explicit and plain-text password, which I would like to avoid.
Why? You can store your public key on them and you would be still able to connect with your private key, which will be still safe.
I would like to know if I can share same private and public keys to everyone, so that I can remote connect on them? In this way, I can generate keys only once and seed it through post-script installation using preseed.
You can, but it is certainly not advised and fail-prone technique possibly leading to the compromised security.