[JIRA] (JENKINS-60698) sshCommand with sudo: true waits forever

2020-01-08 Thread n.ha...@exxellence.nl (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Hardy created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60698  
 
 
  sshCommand with sudo: true waits forever   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Naresh Rayapati  
 
 
Components: 
 ssh-steps-plugin  
 
 
Created: 
 2020-01-08 15:51  
 
 
Environment: 
 Jenkins 2.204.1  Ubuntu 16.04.5 LTS  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Nick Hardy  
 

  
 
 
 
 

 
 I have an issue using an sshCommand with sudo set to true from within a pipeline. 

 

withCredentials([sshUserPrivateKey(credentialsId: credentials_id, keyFileVariable: 'JenkinsIdentity')]) {
	script {
		def remote = [name: server_name, host: host_name, knownHosts: remote_knownHosts, user: remote_user, timeoutSec: 1200, identityFile: JenkinsIdentity]
		
		// install application
		sshCommand remote: remote, command: '/home/user/install.sh', sudo: true
	}
}
 

 The command executes on the remote server, but it's waiting forever. Probably waiting for user input. On the remote server i see this in processes: root 62610 62609 0 16:35 ? 00:00:00 sudo -S -p 4b0b21d6-23ab-4e47-b21e-8362bdf2c4d0 sh /home/user/install.sh It will only stop when i abort the jenkins job. Any ideas on what i can try?  
 

  
 
 
 
 

 
  

[JIRA] (JENKINS-60698) sshCommand with sudo: true waits forever

2020-01-08 Thread n.ha...@exxellence.nl (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Hardy updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-60698  
 
 
  sshCommand with sudo: true waits forever   
 

  
 
 
 
 

 
Change By: 
 Nick Hardy  
 
 
Priority: 
 Minor Major  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.203943.1578498666000.4867.1578498720348%40Atlassian.JIRA.