Skip to main content

Ssh

SSH is a cryptographic network protocol for operating network services securely over an unsecured network. The best-known example application is for remote login to computer systems by users.

🚀 Usage​

Add the following command to your CI configuration file:

fluentci run --wasm ssh x -H $REMOTE_HOST -i ~/.ssh/id_ed25519 -u $REMOTE_USER -s $REMOTE_SCRIPT

Commands​

NameDescription
setupInstall drone-ssh
xExecute a remote command
scpCopy files to a remote server

Code Examples​

Add fluentci-pdk crate to your Cargo.toml:

[dependencies]
fluentci-pdk = "0.2.1"

Use the following code to call a module function:

use fluentci_pdk::dag;

// ...

dag().call(
"https://pkg.fluentci.io/[email protected]?wasm=1",
"x",
vec!["-H", "$REMOTE_HOST", "-i", "~/.ssh/id_ed25519", "-s", "$REMOTE_SCRIPT"],
);

CI/CD integration​

The following examples show how to integrate FluentCI with popular CI providers to execute SSH commands:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: run ssh commands
run: fluentci run --wasm ssh x -H $REMOTE_HOST -i ~/.ssh/id_ed25519 -u $REMOTE_USER -s $REMOTE_SCRIPT