SSH (key-based auth)

Use the Secure Shell protocol to execute commands on a remote server using a private key

Integrate the SSH (key-based auth) API with the Telegram Bot API

Setup the SSH (key-based auth) API trigger to run a workflow which integrates with the Telegram Bot API. Pipedream's integration platform allows you to integrate SSH (key-based auth) and Telegram Bot remarkably fast. Free for developers.

Execute a Command with SSH (key-based auth) API on Channel Updates (Instant) from Telegram Bot API
Telegram Bot + SSH (key-based auth)
 
Try it
Execute a Command with SSH (key-based auth) API on Message Updates (Instant) from Telegram Bot API
Telegram Bot + SSH (key-based auth)
 
Try it
Execute a Command with SSH (key-based auth) API on New Bot Command Received (Instant) from Telegram Bot API
Telegram Bot + SSH (key-based auth)
 
Try it
Execute a Command with SSH (key-based auth) API on New Updates (Instant) from Telegram Bot API
Telegram Bot + SSH (key-based auth)
 
Try it
New Bot Command Received (Instant) from the Telegram Bot API

Emit new event each time a Telegram Bot command is received.

 
Try it
New Channel Updates (Instant) from the Telegram Bot API

Emit new event each time a channel post is created or updated.

 
Try it
New Message Updates (Instant) from the Telegram Bot API

Emit new event each time a Telegram message is created or updated.

 
Try it
New Updates (Instant) from the Telegram Bot API

Emit new event for each new Telegram event.

 
Try it
Execute a Command with the SSH (key-based auth) API

Executes a command on a remote device. See SSH lib docs here

 
Try it
Create Chat Invite Link with the Telegram Bot API

Create an additional invite link for a chat, See the docs for more information

 
Try it
Delete a Message with the Telegram Bot API

Deletes a message. See the docs for more information

 
Try it
Edit a Media Message with the Telegram Bot API

Edits photo or video messages. See the docs for more information

 
Try it
Edit a Text Message with the Telegram Bot API

Edits text or game messages. See the docs for more information

 
Try it

Overview of SSH (key-based auth)

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:

  • Securing server access
  • Sharing data with other systems
  • Managing remote systems
  • Transferring large files between computers
  • Encrypting communication between two computers

Connect SSH (key-based auth)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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()
  },
})

Overview of Telegram Bot

With the Telegram Bot API, you can build bots that perform a variety of tasks,
including:

  • Sending and receiving messages
  • Social networking
  • Content management
  • File sharing
  • Location sharing
  • Bot administration
  • And more!

Connect Telegram Bot

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    telegram_bot_api: {
      type: "app",
      app: "telegram_bot_api",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api.telegram.org/bot${this.telegram_bot_api.$auth.token}/getMe`,
    })
  },
})