"Run Command Line" Fails with Error: "Unable to establish SSH session/channel, Auth fail,"
search cancel

"Run Command Line" Fails with Error: "Unable to establish SSH session/channel, Auth fail,"

book

Article ID: 38214

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

When "Run Command line" action is run using the "Run As" user on a linux machine it gets into a FAILED_PAUSED state giving this error:
"Error occured during action execution: Cannot create process - Unable to establish SSH session/channel, Auth fail,

You should be able to see the following in /var/log/secure.log on the agent machine:

ip-xx-xx-xx-xx su: pam_unix(su:session): session opened for user abc by root(uid=0)

ip-xx-xx-xx-xx sshd[6509]: error: Received disconnect from xx.xx.xx.xx: 3: com.jcraft.jsch.JSchException: Auth fail [preauth]

 

 

Environment

Release Automation Agent: All versions

Operating System: Linux

 

Cause

High level: Configuring the NolioAgent to impersonate users has not been finished. 

Low Level: Depending on whether or not you intend to use the impersonation feature via SSH or sudo/su, the cause/solution varies.

 

SSH

This problem occurs if ssh on the target machine is configured with the password authentication disabled.

 

Sudo/su

The processes.properties has not been properly configured with a cmd.to.execute.

Resolution

As described in the "Cause" section, the solution depends on whether you want to use SSH or sudo/su to impersonate users. Only one of the options below need to be implemented. 

 

SSH

By default, the agent will try to impersonate users by establishing an SSH connection on the local agent machine - using the user/pass supplied to the action. Please perform the following steps:

1. Modify /etc/ssh/sshd_config file and enable password authentication.

2. Restart sshd daemon.

It is recommended to consult a Linux administrator before modifying this file, as this file is an OS related file and is not created with Nolio agent installation.

 

 

Sudo/su

It is possible to use sudo or su to impersonate users. However, it requires additional configuration on the agent machine. Search/Find the section Run Processes Under Different Users – Unix/Linux of page. It has the instructions for implementing the sudo/su methods used to impersonate users.