Skip to main content
Version: 11 - TBD

class connector_types.connector_type_scp.ConnectorTypeSCP

Copy a file from a SCP remote host to Cloudomation Engine or vice-versa.

This connector type uses SCP to copy a single file from a remote host to Cloudomation Engine or to copy a sigle file from Cloudomation Engine to a remote host.

Example: |

SSH key authentication and copying a file from a remote host to Cloudomation Engine

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
this.connect(
connector_type='SCP',
authentication={
'authentication_method': 'ssh_key',
'username': '...',
'ssh_key': '...',
},
host='...',
hostkey={
'hostkey_mode': 'known_host',
'known_host': '...',
},
mode={
'mode_name': 'copy_file_to_engine',
'source_file_name': '...',
'destination_file_name': '...',
},
)
return this.success('all done')

Username and password authentication and copying a file from Cloudomation Engine to a remote host

import flow_api

def handler(system: flow_api.System, this: flow_api.Execution, inputs: dict):
this.connect(
connector_type='SCP',
authentication={
'authentication_method': 'username_password',
'username': '...',
'password': '...',
},
host='...',
port={
'port_mode': 'port_number',
'port_number': 2022, # non-standard port
},
hostkey={
'hostkey_mode': 'known_host',
'known_host': '...',
},
mode={
'mode_name': 'copy_file_from_engine',
'source_file_name': '...',
'destination_file_name': '...',
},
)
return this.success('all done')

Input Schema

  • schema_version

    Type: string

  • authentication

    Type: anyOf

  • host

    The remote hostname or IP address.

    Type: string

  • hostkey

    The public key of host.

    Type: anyOf

  • port

    Type: anyOf

  • mode

    Type: anyOf

  • connect_timeout

    A timeout for connecting to a peer in seconds.

    Type: integer

    Default: 30

Output Schema