Welcome Guest! Log in
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…


Introduction

In Stambia, SSH Metadatas can be created to manipulate SSH, SCP and SFTP protocols.

They can be used in processes with actions like Execute SSH , Send Files with SCP or Get Files with SCP.

We are going to see in this article how to configure such a metadata, and how to use it in basic processes.

 

Creating and configuring an SSH Metadata

The SSH Metadata can be found in metadata creation window, and is named SSH Server.

The configuration is located on the node of the metadata.

Example:

ssh03

Note :

  • Private Key File parameter is the path to the private ssh key
  • Password phrase parameter is the passphrase of the ssh key, if there is one
  • Additional Connection Properties parameter allows to define additional connection properties in the form of Java Properties. (key=value lines separated with line returns)

 

Next, we can add folders to this metadata with Right click > new > remote directory. These folders can be used in processes to fill automatically action parameters.

directory

 

Using the Metadata in a Process

Process overview:

processOverview

SSH process actions can be easily used with the metadata. All the connections settings are filled automatically when the metadata nodes are dragged and dropped on them.

It is possible to use directly a folder, like on SCP action for example. The SCP_REMOTE_DIR will be filled too.

Note :

It is a better practice to use metadatas instead of defining all the parameters on each actions. It permits to simplify a lot the maintenance, debug, and update of your work, but also to apply Configurations to use and test different settings very easily.

For more informations about configurations, you can read Working with Configurations in the Stambia Designer Help Content.

 

Execute SSH Action

The first action in the process is used to send ssh commands to the server. They are put in the body of the action :

sshActionFinal

The Execute SSH action opens a non-interactive shell session on the remote server.

- Keep in mind that this kind of session does not load the user's environement and profile scripts

- See your shell's documentation for more information (documentation for bash)

- An easy way to load environment variables is to "source /home/user/some_config.sh" as the first line of the Action Code

Send files with SCP Action

The second action is used to send files with SCP.

The SCP remote dir is the directory in which files will be sent.

The SCP Local File is path to the file you want to send.

See the Designer's Help for more information about each parameters.

 

Articles

Suggest a new Article!