Yes. You need to use an user account on the Jenkins' server, generate ssh key 
for that account, copy the public key to the target server user account (the 
two user account doesn't need to be the same), then add the server to the 
jenkins admin page, do a connect, you will see if you can connect from jenkins 
server to the target server.
Chunrei

--- On Mon, 2/4/13, kiranm.ch [via Jenkins] 
<ml-node+s361315n465421...@n4.nabble.com> wrote:

From: kiranm.ch [via Jenkins] <ml-node+s361315n465421...@n4.nabble.com>
Subject: Re: How to proper configure Publish Over Plugin for the first time
To: "cchen" <chunr...@yahoo.com>
Date: Monday, February 4, 2013, 7:02 AM



        
Hi,


Have you got any solution abt ur problem,even i am also getting the same error.

If you got solution just let me know.
cchen wrote
This is my first time using publish-over-ssh plugin for Jenkins, and I am 
having trouble figuring out the correct SSH host configurations in the main 
Jenkins configuration section to make this plug-in working for me. 


This is what I want to accomplish: after the build, copy the jar file from the 
Jenkins server (source) to a remote server (target) through SSH, very simple. 
Both servers are Linux OS based.


Here are some of the background info:

1. I don't have an user account on the Jenkins server. The software is 
installed by the system admin. I only use it through its web interface.

2. I have an user account on the remote server.

3. The Jenkins software is installed with no user lock down, which means I can 
access everything through Jenkins Web interface


I tried two combinations in configure system in SSH section. Under both 
conditions, I got the same error message during test configuration.


1. Not use ssh key authentication

Here is the data entered on the SSH section: 

- Jenkins SSH Key: empty

- Passphrase: empty

- Path to key: empty

- Key: empty

- Disable exec: unchecked

SSH Server section

- Name: us...@remoteserver.com

- Hostname: remoteserver.com

- username: user1

- remote directory: empty

- use password authentiation, or use a different key: checked

- Passphrase / password: <entered> (note, use the same password to log into the 
remote server)

- path to key: empty

- key: empty

- port: 22 (default value)

- timeout (ms): (default value)


2. Use SSH key authentication (private key). 

I created SSH (rsa) key pair on remoteserver.com under user1. The files are 
saved under /home/user1/.ssh directory. I copied private key from this server 
and pasted into Jenkins configure page. 

Here is the data entered on the SSH section: 

- Jenkins SSH Key: empty

- Passphrase: empty

- Path to key: empty

- Key: (paste private key from remoteserver.com for user1) 

- Disable exec: unchecked

SSH Server section

- Name: us...@remoteserver.com

- Hostname: remoteserver.com

- username: user1

- remote directory: empty

- use password authentiation, or use a different key: unchecked


Here is the error message.

Failed to connect or change directory. 
jenkins.plugins.publish_over_BapPublisherException: Failed to connect session 
for config [us...@remoteserver.com]. Message [java.net.ConnectException: 
Connection refused]


My questions are:

What is the proper configuration to make this plug-in work? 

What are the steps that I need to do or ask the system admin to do?


Any examples or solutions are welcome.




        
        
        
        

        

        
        
                If you reply to this email, your message will be added to the 
discussion below:
                
http://jenkins.361315.n4.nabble.com/How-to-proper-configure-Publish-Over-Plugin-for-the-first-time-tp4478538p4654211.html
        
        
                
                To unsubscribe from How to proper configure Publish Over Plugin 
for the first time, click here.

                NAML
        



--
View this message in context: 
http://jenkins.361315.n4.nabble.com/How-to-proper-configure-Publish-Over-Plugin-for-the-first-time-tp4478538p4654275.html
Sent from the Jenkins users mailing list archive at Nabble.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 jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to