Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel

In this section:

Table of Contents
maxLevel4

Add_workflow_for_techpubs
AUTH1UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26ca7f046c, userName='null'}
JIRAIDAUTHSBX-86339
REV5UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26cb8305e9, userName='null'}
REV6UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26cd5909df, userName='null'}
REV3UserResourceIdentifier{userKey=8a00a02355cd1c2f0155cd26cb1f0553, userName='null'}
JIRAIDAPPRSBX-85998
REV1UserResourceIdentifier{userKey=8a00a0c85652e498015669b485df0004, userName='null'}


Overview

The 

Spacevars
0series4
is enhanced with a new utility /opt/sonus/bin/SbcSftp with permissions -rwsr-xr-x, which allows the
Spacevars
0product
user to securely transfer files to a remote server using the Linux shell. 

When executed, the program SbcSftp:

  • Creates the necessary Access Control List (ACL) to allow the sftp connection from the
    Spacevars
    0product
    linux shell to a remote server
  • Uploads/Downloads specified files to/from the remote server over a SFTP session, if the user has permissions to access the file

  • Deletes the ACL

The advantage of using SbcSftp over vanilla sftp is that SbcSftp automatically creates and deletes ACLs for accessing the remote server.

Message logs

The file /var/log/sftp.log contains messages about the following:

  • The success/failure of file transfers using SbcSftp, along with exit codes

    Info
    titleNote

    The exit codes are identical to the GNU Linux sftp utility - 0 for success, and 1 for failure.


  • The destination for successful uploads/downloads

Command Syntax

Warning
titleWarning

Customers are advised to use the following "nohup" command so that it completes in the background in case the SSH session closes unexpectedly. This helps to ensure that the ACL rules are cleaned up correctly.

% nohup /opt/sonus/bin/SbcSftp <remote_IP> <remote_port> <username> [upload | download] <local_SBC_path> <remote_server_path>

To use the SbcSftp program, execute the following command:

Code Block
% /opt/sonus/bin/SbcSftp <remote_IP> <remote_port> <username> [upload | download] <local_SBC_path> <remote_server_path>


Tip
titleTip

Enclose wildcard expressions in file paths within double quotes (""). For example:

  • <"local_SBC_path">
  • <"remote_server_path">


Note
titleCaution

Do not configure ACLs to the same remote IP and port using both

Spacevars
0product
CLI and the SbcSftp command; otherwise it causes the SbcSftp command to fail.

Command Examples

Info
titleNote

To execute the commands mentioned below, you must log on to the

Spacevars
0product
as linuxadmin.

Upload

To upload the file /var/log/sonus/sbx/evlog/1000004.ACT from the local

Spacevars
0product
to the /tmp/ directory of the remote server 10.10.10.10 (using TCP port 22):

Code Block
% /opt/sonus/bin/SbcSftp 10.10.10.10 22 user upload /var/log/sonus/sbx/evlog/1000004.ACT /tmp/

Download

To download the file /home/linuxadmin/script.cli from the remote server 10.10.10.10 to the /tmp/ directory of the local

Spacevars
0product
(using TCP port 22):

Code Block
% /opt/sonus/bin/SbcSftp 10.10.10.10 22 user download /tmp/ /home/linuxadmin/script.cli


Pagebreak