Publish Over SSH - How to configure to Tunnel/Forward Via Bastion Host (Jump Host)?

1,303 views
Skip to first unread message

robert.glenn

unread,
Aug 23, 2017, 12:55:25 PM8/23/17
to Jenkins Users
I’m attempting to use the Publish Over SSH plugin to tunnel from Jenkins, through a (publicly facing, in AWS) Bastion Host, into a (private, in AWS) application server. 

Some additional information:
  • I can tunnel to my private app server, locally, after using the  ssh-add -K mysecret.pem, and running ssh -A ec2-user@<my bastion  ip> and then ssh ubuntu@<my private server ip>
  • Currently, the ssh key is shared across Bastion Host and private app server, but likely wouldn’t be in the future
  •  I’m attempting to use the “Jump host” section to define the ip address of the Bastion Host, and filling out the required sections (Name, Hostname, Remote Directory) for the application server
Some potential sources of problem:
  • My Bastion Host has a default user of ‘ec2-user’, whereas my application server’s default user is ‘ubuntu’, but there doesn’t seem to be a way to configure a different user for a “jump host”
Any suggestions you can provide are greatly appreciated.

robert.glenn

unread,
Aug 23, 2017, 3:32:35 PM8/23/17
to Jenkins Users
[Additional Information] 
Reading this commit's message, and looking at the diff, it seems to suggest that one should configure these 'jump hosts' outside of the job configuration (e.g. under Manage Jenkins > Configure System), but the credentials entered there never seem to be available in the job (I always seem to need to configure them directly in the job configuration, in the 'Advanced' area of a Send files or execute commands over SSH build step).

--RG

Rachit Bansal

unread,
Nov 21, 2017, 5:45:27 AM11/21/17
to Jenkins Users
Hi, Have you get any solution for this problem? If yes then please let me know the solution. Thanks in advance
Reply all
Reply to author
Forward
0 new messages