Change default ssh method from go library to external command (#416)
* Change default ssh method from go library to external command
This commit is contained in:
		
				
					committed by
					
						
						Teppei Fukuda
					
				
			
			
				
	
			
			
			
						parent
						
							33b2aa2d52
						
					
				
				
					commit
					05884c2d29
				
			@@ -151,10 +151,10 @@ func exec(c conf.ServerInfo, cmd string, sudo bool, log ...*logrus.Entry) (resul
 | 
			
		||||
	if c.Port == "local" &&
 | 
			
		||||
		(c.Host == "127.0.0.1" || c.Host == "localhost") {
 | 
			
		||||
		result = localExec(c, cmd, sudo)
 | 
			
		||||
	} else if conf.Conf.SSHExternal {
 | 
			
		||||
		result = sshExecExternal(c, cmd, sudo)
 | 
			
		||||
	} else {
 | 
			
		||||
	} else if conf.Conf.SSHNative {
 | 
			
		||||
		result = sshExecNative(c, cmd, sudo)
 | 
			
		||||
	} else {
 | 
			
		||||
		result = sshExecExternal(c, cmd, sudo)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	logger := getSSHLogger(log...)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user