Help required: jenkins SSH connectivity issue

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f804ee3c-1b16-411a-ba18-0f45231d82d0o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

jeremy mordkoff
Where is that file referenced? In your .ssh/config file? It sounds like a simple path issue -- the config file is referencing a location that is not available to jenkins. You can override this on the command line, e.g. something like -i /c/Users/jenkins/ssh/id_rsa


On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8c8c7032-4d1f-4d67-834c-871922e3b33do%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
thanks, i tried in this way also by overrirding file but connection is not established. during more workaround i tried editing sshd config for parameter PermitRootLogin yes but after this change i am not able to login into server itself using ssh key. Is there any suggestion how can i revert back my changes now. i cant login to server and sshd config is server specific in my case. Please suggest.

On Tuesday, July 21, 2020 at 6:00:34 PM UTC+2 [hidden email] wrote:
Where is that file referenced? In your .ssh/config file? It sounds like a simple path issue -- the config file is referencing a location that is not available to jenkins. You can override this on the command line, e.g. something like -i /c/Users/jenkins/ssh/id_rsa


On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/76abb79e-648e-4786-aa8d-4b7a72a8c04fn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

jeremy mordkoff
In reply to this post by sakshira...@gmail.com
ouch. I always keep one window open ssh'd in as root when I play with sshd_config. Hopefully you have console access and a username/password with sudo rights. 

On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/366717fe-86d5-4f83-8990-7584308b3a36o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
Unfortunately i dont hv duplicate instance open। I only have ssh-key to login to the server which was working before

Any other way to implement this?

On Wed, 22 Jul, 2020, 5:54 PM jeremy mordkoff, <[hidden email]> wrote:
ouch. I always keep one window open ssh'd in as root when I play with sshd_config. Hopefully you have console access and a username/password with sudo rights. 

On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/366717fe-86d5-4f83-8990-7584308b3a36o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MOPHtFG8YVvJyXTQyGKnLKdogZKy6Y%2BcvgsKG2v1jRRYg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
i managed to resolve login problem but still facing issue while connecting my remote server using ssh key to jenkins.

i have shell script also where i am doing ssh connection from local to remote and normal execution is working fine without jenkins but when i schedule a build in jenkins it fails. seeking for the suggestions on this if step by step process can be suggested it will be great help. I am stuck in this problem from long time. 

i followed below steps to resolve it till now but didnt work:

* Create an SSH key pair (public/private)   Ran the command “ssh-keygen -t rsa -C "Jenkins agent key" -f "jenkinsAgent_rsa"  “

* Create an SSH credential in the Jenkins machine and put the private key there Created the credentials and put jenkinsAgent_rsa into it.

* Create an SSH agent see https://github.com/jenkinsci/ssh-slaves-plugin/blob/master/doc/CONFIGURE.md#configure-launch-agents-via-ssh – This is creating a node which I didn’t do before – so I created the node and selected the credential with the private key. The verification strategy slect is non-verifying.

  * Select the SSH credential created before as credentials

  * Chose the verification strategy that you want, see the documentation, if you have problems start with the "Non verifying Verification Strategy" you can change it later

* Add the public key on ~/.ssh/authorized_keys This was done

 

I tried to relaunch the node and got the following:


SSH Connection failed with IOException: "Key exchange was not finished, connection is closed.", retrying in 15 seconds. There are 1 more retries left.
[07/23/20 11:03:50] [SSH] WARNING: The SSH key for this host does not match the key required in the connection configuration. Connections will be denied until the host key matches the configuration key.
Key exchange was not finished, connection is closed.
ERROR: Connection is not established!
java.lang.IllegalStateException: Connection is not established!
	at com.trilead.ssh2.Connection.getRemainingAuthMethods(Connection.java:988)
	at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.getRemainingAuthMethods(TrileadSSHPublicKeyAuthenticator.java:88)
	at com.cloudbees.jenkins.plugins.sshcredentials.impl.TrileadSSHPublicKeyAuthenticator.canAuthenticate(TrileadSSHPublicKeyAuthenticator.java:80)
	at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:218)
	at com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator.newInstance(SSHAuthenticator.java:171)
	at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:863)
	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:435)
	at hudson.plugins.sshslaves.SSHLauncher$1.call(SSHLauncher.java:422)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
[07/23/20 11:04:05] Launch failed - cleaning up connection
[07/23/20 11:04:05] [SSH] Connection closed.


On Thu, Jul 23, 2020 at 8:07 AM Sakshi Rathore <[hidden email]> wrote:
Unfortunately i dont hv duplicate instance open। I only have ssh-key to login to the server which was working before

Any other way to implement this?

On Wed, 22 Jul, 2020, 5:54 PM jeremy mordkoff, <[hidden email]> wrote:
ouch. I always keep one window open ssh'd in as root when I play with sshd_config. Hopefully you have console access and a username/password with sudo rights. 

On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/366717fe-86d5-4f83-8990-7584308b3a36o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MN%3DeoGkg8L5daTOHtb2CKtF59PYUvwMWgTCV5-S8QXUSw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

Dirk Heinrichs-3
Am Donnerstag, den 23.07.2020, 13:08 +0200 schrieb Sakshi Rathore:

* Add the public key on ~/.ssh/authorized_keys This was done


You did that on the agent, I guess, and "~" here means "the /home of the user" you try to connect as?

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f4d173ead92529d5c37ed189a58d7cbf9b200ad4.camel%40opentext.com.

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

Dirk Heinrichs-3
In reply to this post by sakshira...@gmail.com
Am Donnerstag, den 23.07.2020, 13:08 +0200 schrieb Sakshi Rathore:

[07/23/20 11:03:50] [SSH] WARNING: The SSH key for this host does not match the key required in the connection configuration. Connections will be denied until the host key matches the configuration key.

You're sure you selected non-verifying strategy? Looks to me like it's still trying to verify the host key.

HTH...

Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5344dbc1bc6d8366f985b477483c8a78e9f383f4.camel%40opentext.com.

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
In reply to this post by Dirk Heinrichs-3
Yes /home/user/.ssh/authorized_keys is complete path 

On Thu, 23 Jul, 2020, 2:28 PM 'Dirk Heinrichs' via Jenkins Users, <[hidden email]> wrote:
Am Donnerstag, den 23.07.2020, 13:08 +0200 schrieb Sakshi Rathore:

* Add the public key on ~/.ssh/authorized_keys This was done


You did that on the agent, I guess, and "~" here means "the /home of the user" you try to connect as?

HTH...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f4d173ead92529d5c37ed189a58d7cbf9b200ad4.camel%40opentext.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MNaw9yUB%2BSWJN6U9u_YspmfAg1%2BECB%2B%2B0VdCpc3j%3D8kJw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

jeremy mordkoff
In reply to this post by sakshira...@gmail.com
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
In reply to this post by Dirk Heinrichs-3
thanks , can you please suggest how can i change it to non verifying one?

On Thu, Jul 23, 2020 at 2:32 PM 'Dirk Heinrichs' via Jenkins Users <[hidden email]> wrote:
Am Donnerstag, den 23.07.2020, 13:08 +0200 schrieb Sakshi Rathore:

[07/23/20 11:03:50] [SSH] WARNING: The SSH key for this host does not match the key required in the connection configuration. Connections will be denied until the host key matches the configuration key.

You're sure you selected non-verifying strategy? Looks to me like it's still trying to verify the host key.

HTH...

Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5344dbc1bc6d8366f985b477483c8a78e9f383f4.camel%40opentext.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MO%2BjxRE%3Dh95ZaBnTeHZwRA_sYmiScb6tQqcXP5nNS7Tjg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
In reply to this post by jeremy mordkoff
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MM8PiT9hjFkLzSfDLyyJgz6Vs%3DJK2HuNmjKXefWLqOMpw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

Dirk Heinrichs-3
In reply to this post by sakshira...@gmail.com
Am Montag, den 27.07.2020, 09:37 +0200 schrieb Sakshi Rathore:

thanks , can you please suggest how can i change it to non verifying one?

Click on your agent, select "Configure", look for "Host Key Verification Strategy" and select "Non verifying Verification Strategy".

HTH...

Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2cf8009f4d003529a5a2da3a984a0ad212f5a814.camel%40opentext.com.

signature.asc (235 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
In reply to this post by sakshira...@gmail.com
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <[hidden email]> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MOK2WhYhvZf%2BC2_Jp5vhF_H5hnC%2BgjaMNuNeVuQYN4CQw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
below is the part of my script where i am doing ssh and it works fine in local.

scp -i $SSHKEY_PATH $CERT_PATH ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $KEY_FILE ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $CRT_FILE ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./check.sh ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./old_server.sh ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./cert_status1.sh ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./new_server_cert.sh ccpuser@10.32.141.35:/home/ccpuser

sed -i -e 's/\r$//' ./check.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//'  ./cert_status1.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//' ./new_server_cert.sh


echo "check1"

ssh -i $SSHKEY_PATH [hidden email] /bin/bash <<EOF

this ssh key belongs to server login

when i try to execute this using jenkins build:
Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory.
Host key verification failed.
lost connection
I have generated ssh key in ssh server for jenkins and put public key into home/.ssh/authorized_keys location  and private key for ssh setup in jenkins but i am not able to connect to the ssh server
i also tried simple ssh to the server in build step but it is not working. Please advise where I am wrong.

On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore <[hidden email]> wrote:
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <[hidden email]> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MNr3VUWQADaWV-M_ta226YXVD4DASRu5hbaUYuWFsp3KQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

jeremy mordkoff
There are two SSH keys involved when establishing a session 

The one you are setting here is the key used ti identify the client to the server (host). There is also the key that the server (host) sends down to the client. You can see this the first time you ssh to a host and it asks you if you want to accept the key. Once you do accept it, it is stored in .ssh/known_hosts and subsequent connections are verified automatically. 

You have two choices. Disable host key verification or add the host key manually to jenkins' known_hosts file.

to disable host key checking, add this to your .ssh/config 
StrictHostKeyChecking no
This can also be done on the commandline .. something like 
-o StrictHostKeyChecking=no

or you can pre-create the known_hosts file. One way would be to delete it, ssh to the host manually and then examine the known_hosts file. There should be one line in it something like this
jenkins7,10.64.10.74 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNiUivaQ4skdl0sc0A/a0aFxA1p/Sd/6AcYpZcjC0UA9YaO5ADJT+Ercb9fHrcuQdiEOMi36LVNdS5TY1EeFYzs=
copy that into jenkins' known_hosts file 



On Wednesday, July 29, 2020 at 2:50:04 AM UTC-4, Sakshi Rathore wrote:
below is the part of my script where i am doing ssh and it works fine in local.

scp -i $SSHKEY_PATH $CERT_PATH ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $KEY_FILE ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $CRT_FILE ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./check.sh ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./old_server.sh ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./cert_status1.sh ccpuser@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./new_server_cert.sh ccpuser@10.32.141.35:/home/ccpuser

sed -i -e 's/\r$//' ./check.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//'  ./cert_status1.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//' ./new_server_cert.sh


echo "check1"

ssh -i $SSHKEY_PATH <a href="javascript:" target="_blank" gdf-obfuscated-mailto="nt9lE6SaAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ccp...@10.32.141.35 /bin/bash <<EOF

this ssh key belongs to server login

when i try to execute this using jenkins build:
Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory.
Host key verification failed.
lost connection
I have generated ssh key in ssh server for jenkins and put public key into home/.ssh/authorized_keys location  and private key for ssh setup in jenkins but i am not able to connect to the ssh server
i also tried simple ssh to the server in build step but it is not working. Please advise where I am wrong.

On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="nt9lE6SaAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sakshira...@...> wrote:
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="nt9lE6SaAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sakshira...@...> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <<a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="nt9lE6SaAgAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jeremy....@...> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="nt9lE6SaAgAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b0fad762-558d-4e32-83c3-8238ddac0a62o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com

thanks very much for all the advice , i tried in the given way but while conencting to the server to the client using manual ssh 

i get below error everytime:

ccpuser@harbortest-master-gro-a7c3cedfab:~$ ssh ccpuser@10.32.141.35
The authenticity of host '10.32.141.35 (10.32.141.35)' can't be established.
ECDSA key fingerprint is SHA256:bSeIr7zG7863687fvTDsZrG3Kc77pUXMLZKwu4YMRfrY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.32.141.35' (ECDSA) to the list of known hosts.
ccpuser@10.32.141.35: Permission denied (publickey,keyboard-interactive). 
respective keys have been already added , public key to /home/.ssh/authorized_key 
ialso tried to add private key identity as part of troubleshoot

ccpuser@harbortest-master-gro-a7c3cedfab:~/.ssh$ ssh-add ~/.ssh/id_rsa
Identity added: /home/ccpuser/.ssh/id_rsa (/home/ccpuser/.ssh/id_rsa)


i have also tried to disable host key checking in etc/ssh/ssh_config file
StrictHostKeyChecking no

if i try to avoid permission denied error google suggestion leads me to password authentication and i want to do ssh login 

I have tried everything to get it owkr adding ssh key authentication tojenkins server in credentials section and ssh-sites but nothing seems working for me  , i am not able to conenct to jenkins client to my remote server. 


my humble request to suggest a way forward or any approach so i can proceed further. It will be great help.

On Wednesday, July 29, 2020 at 3:46:41 PM UTC+2 [hidden email] wrote:
There are two SSH keys involved when establishing a session 

The one you are setting here is the key used ti identify the client to the server (host). There is also the key that the server (host) sends down to the client. You can see this the first time you ssh to a host and it asks you if you want to accept the key. Once you do accept it, it is stored in .ssh/known_hosts and subsequent connections are verified automatically. 

You have two choices. Disable host key verification or add the host key manually to jenkins' known_hosts file.

to disable host key checking, add this to your .ssh/config 
StrictHostKeyChecking no
This can also be done on the commandline .. something like 
-o StrictHostKeyChecking=no

or you can pre-create the known_hosts file. One way would be to delete it, ssh to the host manually and then examine the known_hosts file. There should be one line in it something like this
jenkins7,10.64.10.74 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNiUivaQ4skdl0sc0A/a0aFxA1p/Sd/6AcYpZcjC0UA9YaO5ADJT+Ercb9fHrcuQdiEOMi36LVNdS5TY1EeFYzs=
copy that into jenkins' known_hosts file 



On Wednesday, July 29, 2020 at 2:50:04 AM UTC-4, Sakshi Rathore wrote:
below is the part of my script where i am doing ssh and it works fine in local.

scp -i $SSHKEY_PATH $CERT_PATH ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $KEY_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $CRT_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./check.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./old_server.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./cert_status1.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./new_server_cert.sh ccp...@10.32.141.35:/home/ccpuser

sed -i -e 's/\r$//' ./check.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//'  ./cert_status1.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//' ./new_server_cert.sh


echo "check1"

ssh -i $SSHKEY_PATH ccp...@10.32.141.35 /bin/bash <<EOF

this ssh key belongs to server login

when i try to execute this using jenkins build:
Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory.
Host key verification failed.
lost connection
I have generated ssh key in ssh server for jenkins and put public key into home/.ssh/authorized_keys location  and private key for ssh setup in jenkins but i am not able to connect to the ssh server
i also tried simple ssh to the server in build step but it is not working. Please advise where I am wrong.

On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore <[hidden email]> wrote:
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <[hidden email]> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/48e3a682-c8f0-4a12-ab60-eaf936de0c33n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

jeremy mordkoff
ssh is picky about permissions. 

make sure the .ssh directory itself has perms 770 and any files in that folder have perms 660 and that they are all owned by the correct user on both the client and server. 

try adding -o identitiesOnly=yes on the ssh client command line. There is a server config that limits the number of failed connects. 

try running the client in verbose mode (-v or -vv) -- every now and then a message shows up there with a hint. 

if you're still stuck, set the server logging to debug and check there. Always keep one ssh session open as root to the server when changing the ssh server config file (usually /etc/ssh/sshd_config)



On Friday, July 31, 2020 at 4:09:19 AM UTC-4, [hidden email] wrote:

thanks very much for all the advice , i tried in the given way but while conencting to the server to the client using manual ssh 

i get below error everytime:

ccpuser@harbortest-master-gro-a7c3cedfab:~$ ssh <a href="javascript:" target="_blank" gdf-obfuscated-mailto="TgZjBpX0AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ccp...@10.32.141.35
The authenticity of host '10.32.141.35 (10.32.141.35)' can't be established.
ECDSA key fingerprint is SHA256:bSeIr7zG7863687fvTDsZrG3Kc77pUXMLZKwu4YMRfrY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.32.141.35' (ECDSA) to the list of known hosts.
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="TgZjBpX0AgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ccp...@10.32.141.35: Permission denied (publickey,keyboard-interactive). 
respective keys have been already added , public key to /home/.ssh/authorized_key 
ialso tried to add private key identity as part of troubleshoot

ccpuser@harbortest-master-gro-a7c3cedfab:~/.ssh$ ssh-add ~/.ssh/id_rsa
Identity added: /home/ccpuser/.ssh/id_rsa (/home/ccpuser/.ssh/id_rsa)


i have also tried to disable host key checking in etc/ssh/ssh_config file
StrictHostKeyChecking no

if i try to avoid permission denied error google suggestion leads me to password authentication and i want to do ssh login 

I have tried everything to get it owkr adding ssh key authentication tojenkins server in credentials section and ssh-sites but nothing seems working for me  , i am not able to conenct to jenkins client to my remote server. 


my humble request to suggest a way forward or any approach so i can proceed further. It will be great help.

On Wednesday, July 29, 2020 at 3:46:41 PM UTC+2 [hidden email] wrote:
There are two SSH keys involved when establishing a session 

The one you are setting here is the key used ti identify the client to the server (host). There is also the key that the server (host) sends down to the client. You can see this the first time you ssh to a host and it asks you if you want to accept the key. Once you do accept it, it is stored in .ssh/known_hosts and subsequent connections are verified automatically. 

You have two choices. Disable host key verification or add the host key manually to jenkins' known_hosts file.

to disable host key checking, add this to your .ssh/config 
StrictHostKeyChecking no
This can also be done on the commandline .. something like 
-o StrictHostKeyChecking=no

or you can pre-create the known_hosts file. One way would be to delete it, ssh to the host manually and then examine the known_hosts file. There should be one line in it something like this
jenkins7,10.64.10.74 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNiUivaQ4skdl0sc0A/a0aFxA1p/Sd/6AcYpZcjC0UA9YaO5ADJT+Ercb9fHrcuQdiEOMi36LVNdS5TY1EeFYzs=
copy that into jenkins' known_hosts file 



On Wednesday, July 29, 2020 at 2:50:04 AM UTC-4, Sakshi Rathore wrote:
below is the part of my script where i am doing ssh and it works fine in local.

scp -i $SSHKEY_PATH $CERT_PATH ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $KEY_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $CRT_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./check.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./old_server.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./cert_status1.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./new_server_cert.sh ccp...@10.32.141.35:/home/ccpuser

sed -i -e 's/\r$//' ./check.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//'  ./cert_status1.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//' ./new_server_cert.sh


echo "check1"

ssh -i $SSHKEY_PATH ccp...@10.32.141.35 /bin/bash <<EOF

this ssh key belongs to server login

when i try to execute this using jenkins build:
Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory.
Host key verification failed.
lost connection
I have generated ssh key in ssh server for jenkins and put public key into home/.ssh/authorized_keys location  and private key for ssh setup in jenkins but i am not able to connect to the ssh server
i also tried simple ssh to the server in build step but it is not working. Please advise where I am wrong.

On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore <[hidden email]> wrote:
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <[hidden email]> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/092a6094-5f76-40bf-b2f6-0accc42e6f57o%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/63ed9be4-f2d4-4d32-9157-c90e18d2420fo%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
 thanks a lot, i just solved permission denied issue and able to ssh from client to host
1. 
jenkins@harbortest-master-gro-a7c3cedfab:~/.ssh$ ssh ccpuser@harbortest-master-gro-a7c3cedfab
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-64-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Are you ready for Kubernetes 1.19? It's nearly here! Try RC3 with
   sudo snap install microk8s --channel=1.19/candidate --classic

   https://www.microk8s.io/ has docs and details.
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.
Last login: Fri Jul 31 13:31:29 2020 from 10.36.174.37
ccpuser@harbortest-master-gro-a7c3cedfab:~$ cd .ssh/

 2. But in jenkins console i am still getting cant connect to the server :

image.png


image.png

and still from my local system to host i cant ssh directly:

sakshi_rathore@MCN234 MINGW64 ~/.ssh (master)
$ ssh [hidden email]
[hidden email]: Permission denied (publickey,keyboard-interactive).

Could you please also suggest for this. 

On Fri, Jul 31, 2020 at 3:18 PM jeremy mordkoff <[hidden email]> wrote:
ssh is picky about permissions. 

make sure the .ssh directory itself has perms 770 and any files in that folder have perms 660 and that they are all owned by the correct user on both the client and server. 

try adding -o identitiesOnly=yes on the ssh client command line. There is a server config that limits the number of failed connects. 

try running the client in verbose mode (-v or -vv) -- every now and then a message shows up there with a hint. 

if you're still stuck, set the server logging to debug and check there. Always keep one ssh session open as root to the server when changing the ssh server config file (usually /etc/ssh/sshd_config)



On Friday, July 31, 2020 at 4:09:19 AM UTC-4, [hidden email] wrote:

thanks very much for all the advice , i tried in the given way but while conencting to the server to the client using manual ssh 

i get below error everytime:

ccpuser@harbortest-master-gro-a7c3cedfab:~$ ssh ccp...@10.32.141.35
The authenticity of host '10.32.141.35 (10.32.141.35)' can't be established.
ECDSA key fingerprint is SHA256:bSeIr7zG7863687fvTDsZrG3Kc77pUXMLZKwu4YMRfrY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.32.141.35' (ECDSA) to the list of known hosts.
ccp...@10.32.141.35: Permission denied (publickey,keyboard-interactive). 
respective keys have been already added , public key to /home/.ssh/authorized_key 
ialso tried to add private key identity as part of troubleshoot

ccpuser@harbortest-master-gro-a7c3cedfab:~/.ssh$ ssh-add ~/.ssh/id_rsa
Identity added: /home/ccpuser/.ssh/id_rsa (/home/ccpuser/.ssh/id_rsa)


i have also tried to disable host key checking in etc/ssh/ssh_config file
StrictHostKeyChecking no

if i try to avoid permission denied error google suggestion leads me to password authentication and i want to do ssh login 

I have tried everything to get it owkr adding ssh key authentication tojenkins server in credentials section and ssh-sites but nothing seems working for me  , i am not able to conenct to jenkins client to my remote server. 


my humble request to suggest a way forward or any approach so i can proceed further. It will be great help.

On Wednesday, July 29, 2020 at 3:46:41 PM UTC+2 [hidden email] wrote:
There are two SSH keys involved when establishing a session 

The one you are setting here is the key used ti identify the client to the server (host). There is also the key that the server (host) sends down to the client. You can see this the first time you ssh to a host and it asks you if you want to accept the key. Once you do accept it, it is stored in .ssh/known_hosts and subsequent connections are verified automatically. 

You have two choices. Disable host key verification or add the host key manually to jenkins' known_hosts file.

to disable host key checking, add this to your .ssh/config 
StrictHostKeyChecking no
This can also be done on the commandline .. something like 
-o StrictHostKeyChecking=no

or you can pre-create the known_hosts file. One way would be to delete it, ssh to the host manually and then examine the known_hosts file. There should be one line in it something like this
jenkins7,10.64.10.74 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNiUivaQ4skdl0sc0A/a0aFxA1p/Sd/6AcYpZcjC0UA9YaO5ADJT+Ercb9fHrcuQdiEOMi36LVNdS5TY1EeFYzs=
copy that into jenkins' known_hosts file 



On Wednesday, July 29, 2020 at 2:50:04 AM UTC-4, Sakshi Rathore wrote:
below is the part of my script where i am doing ssh and it works fine in local.

scp -i $SSHKEY_PATH $CERT_PATH ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $KEY_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $CRT_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./check.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./old_server.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./cert_status1.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./new_server_cert.sh ccp...@10.32.141.35:/home/ccpuser

sed -i -e 's/\r$//' ./check.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//'  ./cert_status1.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//' ./new_server_cert.sh


echo "check1"

ssh -i $SSHKEY_PATH ccp...@10.32.141.35 /bin/bash <<EOF

this ssh key belongs to server login

when i try to execute this using jenkins build:
Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory.
Host key verification failed.
lost connection
I have generated ssh key in ssh server for jenkins and put public key into home/.ssh/authorized_keys location  and private key for ssh setup in jenkins but i am not able to connect to the ssh server
i also tried simple ssh to the server in build step but it is not working. Please advise where I am wrong.

On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore <[hidden email]> wrote:
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <[hidden email]> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/63ed9be4-f2d4-4d32-9157-c90e18d2420fo%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MNuLCqb26H0Z0YFDK33LMnGSgeWGf4dcqLXi%3DfgxFqiEw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Help required: jenkins SSH connectivity issue

sakshira...@gmail.com
could you please help here? 

On Fri, Jul 31, 2020 at 3:52 PM Sakshi Rathore <[hidden email]> wrote:
 thanks a lot, i just solved permission denied issue and able to ssh from client to host
1. 
jenkins@harbortest-master-gro-a7c3cedfab:~/.ssh$ ssh ccpuser@harbortest-master-gro-a7c3cedfab
Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-64-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Are you ready for Kubernetes 1.19? It's nearly here! Try RC3 with
   sudo snap install microk8s --channel=1.19/candidate --classic

   https://www.microk8s.io/ has docs and details.
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.
Last login: Fri Jul 31 13:31:29 2020 from 10.36.174.37
ccpuser@harbortest-master-gro-a7c3cedfab:~$ cd .ssh/

 2. But in jenkins console i am still getting cant connect to the server :

image.png


image.png

and still from my local system to host i cant ssh directly:

sakshi_rathore@MCN234 MINGW64 ~/.ssh (master)
$ ssh [hidden email]
[hidden email]: Permission denied (publickey,keyboard-interactive).

Could you please also suggest for this. 

On Fri, Jul 31, 2020 at 3:18 PM jeremy mordkoff <[hidden email]> wrote:
ssh is picky about permissions. 

make sure the .ssh directory itself has perms 770 and any files in that folder have perms 660 and that they are all owned by the correct user on both the client and server. 

try adding -o identitiesOnly=yes on the ssh client command line. There is a server config that limits the number of failed connects. 

try running the client in verbose mode (-v or -vv) -- every now and then a message shows up there with a hint. 

if you're still stuck, set the server logging to debug and check there. Always keep one ssh session open as root to the server when changing the ssh server config file (usually /etc/ssh/sshd_config)



On Friday, July 31, 2020 at 4:09:19 AM UTC-4, [hidden email] wrote:

thanks very much for all the advice , i tried in the given way but while conencting to the server to the client using manual ssh 

i get below error everytime:

ccpuser@harbortest-master-gro-a7c3cedfab:~$ ssh ccp...@10.32.141.35
The authenticity of host '10.32.141.35 (10.32.141.35)' can't be established.
ECDSA key fingerprint is SHA256:bSeIr7zG7863687fvTDsZrG3Kc77pUXMLZKwu4YMRfrY.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.32.141.35' (ECDSA) to the list of known hosts.
ccp...@10.32.141.35: Permission denied (publickey,keyboard-interactive). 
respective keys have been already added , public key to /home/.ssh/authorized_key 
ialso tried to add private key identity as part of troubleshoot

ccpuser@harbortest-master-gro-a7c3cedfab:~/.ssh$ ssh-add ~/.ssh/id_rsa
Identity added: /home/ccpuser/.ssh/id_rsa (/home/ccpuser/.ssh/id_rsa)


i have also tried to disable host key checking in etc/ssh/ssh_config file
StrictHostKeyChecking no

if i try to avoid permission denied error google suggestion leads me to password authentication and i want to do ssh login 

I have tried everything to get it owkr adding ssh key authentication tojenkins server in credentials section and ssh-sites but nothing seems working for me  , i am not able to conenct to jenkins client to my remote server. 


my humble request to suggest a way forward or any approach so i can proceed further. It will be great help.

On Wednesday, July 29, 2020 at 3:46:41 PM UTC+2 [hidden email] wrote:
There are two SSH keys involved when establishing a session 

The one you are setting here is the key used ti identify the client to the server (host). There is also the key that the server (host) sends down to the client. You can see this the first time you ssh to a host and it asks you if you want to accept the key. Once you do accept it, it is stored in .ssh/known_hosts and subsequent connections are verified automatically. 

You have two choices. Disable host key verification or add the host key manually to jenkins' known_hosts file.

to disable host key checking, add this to your .ssh/config 
StrictHostKeyChecking no
This can also be done on the commandline .. something like 
-o StrictHostKeyChecking=no

or you can pre-create the known_hosts file. One way would be to delete it, ssh to the host manually and then examine the known_hosts file. There should be one line in it something like this
jenkins7,10.64.10.74 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNiUivaQ4skdl0sc0A/a0aFxA1p/Sd/6AcYpZcjC0UA9YaO5ADJT+Ercb9fHrcuQdiEOMi36LVNdS5TY1EeFYzs=
copy that into jenkins' known_hosts file 



On Wednesday, July 29, 2020 at 2:50:04 AM UTC-4, Sakshi Rathore wrote:
below is the part of my script where i am doing ssh and it works fine in local.

scp -i $SSHKEY_PATH $CERT_PATH ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $KEY_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH $CRT_FILE ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./check.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./old_server.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./cert_status1.sh ccp...@10.32.141.35:/home/ccpuser
scp -i $SSHKEY_PATH ./new_server_cert.sh ccp...@10.32.141.35:/home/ccpuser

sed -i -e 's/\r$//' ./check.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//'  ./cert_status1.sh
sed -i -e 's/\r$//' ./old_server.sh
sed -i -e 's/\r$//' ./new_server_cert.sh


echo "check1"

ssh -i $SSHKEY_PATH ccp...@10.32.141.35 /bin/bash <<EOF

this ssh key belongs to server login

when i try to execute this using jenkins build:
Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory.
Host key verification failed.
lost connection
I have generated ssh key in ssh server for jenkins and put public key into home/.ssh/authorized_keys location  and private key for ssh setup in jenkins but i am not able to connect to the ssh server
i also tried simple ssh to the server in build step but it is not working. Please advise where I am wrong.

On Wed, Jul 29, 2020 at 8:35 AM Sakshi Rathore <[hidden email]> wrote:
I tried a lot of things but my ssh connection is not working from jenkins to ssh server.

One more thing my Jenkins and ssh server is hosting on same IP address is there anyway i can resolve this issue?

On Mon, 27 Jul, 2020, 9:39 AM Sakshi Rathore, <[hidden email]> wrote:
thanks , i tried this as well but while getting connection encountring below error:

Permission denied (publickey,password,keyboard-interactive) 
build marked as failed. 

On Thu, Jul 23, 2020 at 3:47 PM jeremy mordkoff <[hidden email]> wrote:
I think the issue is that the client does not trust the server's host key. These keys are stored by the client in ~/.ssh/known_hosts  Try copying/appending your .ssh/known_hosts file to jenkins'



On Monday, July 20, 2020 at 5:43:39 PM UTC-4, Sakshi Rathore wrote:
0I have a bash script which connects and exexutes programs from my local to remote server and now this should be executed from jenkins build so for this jenkins is taking continous changes from git for this script but my build is failing with below error:

Warning: Identity file /c/Users/D35N/Downloads/GitHubProjeckt/Automation/GitHubProjeckt/newharbortestkey not accessible: No such file or directory. Host key verification failed. Build step 'Execute shell' marked build as failure

I have tried to set ssh connectivity in my jenkins server for this remote server incredentials and ssh plugins but using my key i am getting an error cant connect to the server.

when i run the script from local it works fine and my ssh connection gets established properly using SSH key.

jenkins server is also integrated or installed on my kuberenets cluster which is my remote server in this case and bash script should execute on this kuberenets cluster.

i generated ley for jenkins in remote server and using this key for ssh plugin setup but i am getting cant connect to the server error everytime.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/63ed9be4-f2d4-4d32-9157-c90e18d2420fo%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAJeB3MPsEbz7sXDDVOvncjN%3DRUBbSqJT1uCreJBEbq2RxmSiEw%40mail.gmail.com.
12