Status: Open (View Workflow)
windows to windows connectivity
we want to achieve the Jenkins pipeline in cross IP environment(same server domain but different IP) I am trying to copy the shell script file from one windows server to another windows server (through shell script), after successful copy of file we want to execute that copied shell script file on target server(where we copied the file). when we trying to implement this we are facing the following challenges:-
- How we can authenticate the target server because RSA_private_key and Public_key exchange method is not working?
- When we try to implement this through scp and ssh configuration through plugin and openssh we are getting the following error:
Started by user jenkins
[EnvInject] - Loading node environment variables.
Building in workspace C:\Users\admin\.jenkins\workspace\testing scp
CIFS: Connecting from host [IIServer1]
CIFS: Connecting with configuration [IIServer2] ...
ERROR: Exception when publishing, exception message [Exception when testing config. URL [smb://IIServer2/H:/scripts/], Message: [Logon failure: unknown user name or bad password.]]
Build step 'Send files to a windows share' changed build result to UNSTABLE
[SCP] Connecting to IIServer2
ERROR: Failed to upload files
com.jcraft.jsch.JSchException: Algorithm negotiation fail
If you need any further clarification kindly let me know.
It will be great if you can help me on the above error.
Thanks for your response. we tried putting the shared folder path of target server inside the configuration but error is remain same.
Did you specify the user as domain\username? Does the test connection in the global config work correctly?
I tried in other way like username@domain-name so it's works. Now can you please help me with the, how can we execute the shell script on the target server because target server is windows so it's throwing error like unrecognized command. is there any way?
I'm not the maintainer of the SCP plugin, so I am not sure what could be the issue. Which SSH server are you running on Windows?
It looks like from the error in the log that JSch and the OpenSSH server don't have a matching of key algorithms. You can search on the web for various things to try.
Your share path looks incorrect "smb://IIServer2/H:/scripts/". You can't just put a drive letter and directory on there, you have to expose the share on the Windows server and then use that share path. This doesn't look like an issue in publish-over-cifs