You saved me a lot of time, I was copying the private ssh key without the -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----, that's why it was not working... Thank you!
I am trying this for deployment on linux RHEL. I am using same credential ID in ssh command which I have saved in Jenkins credentials still it is giving "Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)."
I can't comment without seeing your pipeline, exceptions, etc. Better re-generate keys, put public in RHEL and private in Jenkins creds. Also you can try using SSH Steps plugin, this allows user/password. thanks
You need to have git installed in your windows machine. If not done yet, use this link(git-scm.com/download/win) to download and install. If installed successfully and usual path, after that you will see your ssh-agent in this path: "C:\Program Files\Git\usr\bin\ssh-agent.exe" thanks
✅CI/CD Pipeline Course👇
www.udemy.com/course/cicd-pipelines-devops-jenkins-python-docker/?referralCode=AC03DFF9ABBABBEAB333
Thanks a lot, man !! No one saying about copy the public key to the authorized key. Thanks a lot
You saved me a lot of time, I was copying the private ssh key without the -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY-----, that's why it was not working...
Thank you!
Thanks alot man this window issue was the blocker ..it really helped
nicely detailed video bro'
thank you for the video ,exactly what i was looking for
You are welcome!! glad that it helped.
how to connect to another EC2 intance if my jenkins server is on another different EC2 instance?
I am trying this for deployment on linux RHEL. I am using same credential ID in ssh command which I have saved in Jenkins credentials still it is giving "Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)."
I can't comment without seeing your pipeline, exceptions, etc. Better re-generate keys, put public in RHEL and private in Jenkins creds. Also you can try using SSH Steps plugin, this allows user/password. thanks
Hey Kumar,
When I checked where ssh-agent on my windows machine it's showing only one path which is in windows/system32/openssh.. what I can do?
You need to have git installed in your windows machine. If not done yet, use this link(git-scm.com/download/win) to download and install.
If installed successfully and usual path, after that you will see your ssh-agent in this path: "C:\Program Files\Git\usr\bin\ssh-agent.exe"
thanks
Hey I am getting same error on Linux.... Suitable ssh agent provider not found ... please guide
Amit, Which Linux you using? ssh-agent is supposed to be started on Linux automatically. Try #eval `ssh-agent`, if not started yet. Thanks
how to execute .exe file on remote machine(windows server) using jenkins job(Linux machine)
You can install windows agent on your windows. On the agent node you should be able to run batch files.
thanks
Thanks! can we pass private key in Jenkinsfile (script) itself. I want to generate script with private key as I do not have Jenkins admin access.
You may try this plugin instead: plugins.jenkins.io/ssh-steps/
Thanks