Use the Secure Shell protocol to execute commands on a remote server using a private key
Executes a command on a remote device. See SSH lib docs here
Add or update a single record in your Pipedream Data Store.
Add or update multiple records to your Pipedream Data Store.
Append to a record in your data store Pipedream Data Store. If the record does not exist, a new record will be created in an array format.
Check if a key exists in your Pipedream Data Store or create one if it doesn't exist.
The Secure Shell (SSH) API is an powerful tool for securely connecting to
remote systems over a network, allowing users to easily and securely access
their systems or services. This API is useful for a variety of tasks including
data transfer and remote system management.
Key-based authentication is a way of validating the identity of the client to
the server. It works by generating and exchanging a digital key that must match
in order for the user to access the server. This provides an extra layer of
security, as it is much harder to guess a digital key than a user password.
With the SSH (key-based auth) API, you can use key-based authentication to
create an encrypted, authenticated channel between two computers. This can be
used for securely accessing services, such as:
module.exports = defineComponent({
props: {
ssh: {
type: "app",
app: "ssh",
}
},
async run({steps, $}) {
const SSH2Promise = require('ssh2-promise')
const {
host,
port,
username,
privateKey,
} = this.ssh.$auth
const ssh = new SSH2Promise({
host,
port,
username,
privateKey,
})
await ssh.connect()
console.log("Connection established")
// Replace this with the command you'd like to run
const resp = await ssh.exec("whoami")
console.log(resp)
await ssh.close()
},
})
With the Data Stores API, you can build applications that:
export default defineComponent({
props: {
myDataStore: {
type: "data_store",
},
},
async run({ steps, $ }) {
await this.myDataStore.set("key_here","Any serializable JSON as the value")
return await this.myDataStore.get("key_here")
},
})