View Source

{section}
{column}

h1. Introduction

The Petals BS SFTP tooling pack for Petals CLI is a set of commands relatives to the Petals BC SFTP. The pack comes with the commands:
* {{bc-sftp.check-connect}}: Check the establishment of a connection to a remote SSH server using the same SSH stack than the BC.

{column}
{column:width=40%}
{panel:title=Table of contents}{toc}{panel}
{panel:title=Contributors}{contributors:order=name|mode=list}{panel}
{column}
{section}

h1. Installing the Petals BC SFTP tooling pack

h2. Through Debians packages

If you have installed Petals CLI using the Debian packages, we recommend you to install the Petals BC SFTP tooling pack using its own Debian package ({{petals-cli-bc-sftp}}). Otherwise, unzip the content of the ZIP archive in the directory {{$PETALS_CLI_HOME/extensions}}.

h2. Through ZIP archives

If you have installed the *full* ZIP archive, the extension should be already installed. Otherwise, unzip the content of the ZIP archive {{petals-cli-bc-sftp}} in the directory {{$PETALS_CLI_HOME/extensions}}.

h2. Installation verification

To check that the installation is correct, just get the list of available commands of your Petals CLI, you should see the command '{{bc-sftp.*}}' in the list:
{code}
> ./petals-cli.sh -c -- help
Available commands:
...
bc-sftp.check-connect
Check connection establishment of the BC SFTP.
connect Connect to a Petals ESB node.
...
{code}

h1. Commands

h2. Checking the establishment of connection to a SSH server

The command *{{bc-sftp.check-connect}}* provides to check the establishment of a connection to your SSH server using the same SSH stack than the one used by the Petals BC SFTP.

The check result is given through the command return code:
* *0*: the connection has been established,
* other value: the connection has failed, the reason is explained in a printed message.

{code}
USAGE:
bc-sftp.check-connect [-d <directory>] [-p <port>] -s <server> -u <username> -w <password>


DESCRIPTION:
Check connection establishment of the BC SFTP

OPTIONS DESCRIPTION:
-d,--directory <directory> The home directory (Default value: "/").
-p,--port <port> The port of the SSH server (Default value:
22)
-s,--server <server> The SSH server on which the connection will
be established.
-u,--username <username> The username.
-w,--password <password> The password.
{code}