You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The JS7 - JITL SSH allows the execution of shell commands and scripts on a remote host running an SSH server without requiring a local SSH client to be installed. To log in to remote systems using a pair of keys. first, you need to add the public key on the remote server to the authorized_keys file in the .ssh/ directory in the home directory on the remote machine.

Workflow

The folder 11_AgentlessScheduling includes the two workflows which use the JITL com.sos.jitl.jobs.ssh.SSHJob with the parameter host, port, auth_method, command, etc to login into the SSH account:

jdSSHPublicKeyAuthentication: In this workflow, the command parameter is used to execute a single command on the remote server. 

jdSSHScriptPublicKeyAuthentication: In this workflow, the command_script parameter is used to run the complete script on the remote server. You can write a shell script in the command_script parameter it will execute the complete script on the remote server.

To execute the workflow from the 11_AgentlessScheduling folder follow the below steps:

  1. Click on the folder 11_AgentlessScheduling and expand any of the workflows I am using jdSSHScriptPublicKeyAuthentication.



  2. To add an order to the workflow, click the action menu of the workflow and select Add Order from the drop-down menu.




  3. When clicking Add Order a popup window will appear.
  4. You can add an Order ID or leave the Order ID value empty, it will then use a default Order ID. Click the Submit button.



  5. To check the status of the order click the name of the workflow. This will make the Order History panel appear.



  6. From the Order History panel, you can verify that the order is successful and finished. Click the Order ID to see the log output created by jobs executed for this order.



  7. A log view window will open and the order log will be displayed. This log contains the output of all jobs executed by the order. You can see the remote hostname for the SSH server is displayed. 
  8. You can download the log file by clicking the Download button from the upper right corner of the log view window. Also, you can expand and collapse the individual job output using the chevron icons from the left upper corner of the log view window.


  • No labels