← All use cases SSH & Remote

SSH into servers, jump through bastions, manage remote infra

Your agent opens SSH sessions, enters passwords, navigates jump hosts, and operates remote machines — all through the agend environment. No SSH key sharing, no local port forwarding. The agent works from its own isolated machine.

Illustrative workflow and output. Verify application compatibility and results in your own test environment.

ssh & remote
$ claude "check why prod-web-03 is returning 503s"
 
> shell_exec("ssh bastion.corp.internal", interactive=true)
Password:
> shell_send_raw("********\n")
Welcome to bastion.corp.internal
 
> shell_send_raw("ssh prod-web-03\n")
deploy@prod-web-03:~$
 
> shell_send_raw("sudo journalctl -u nginx --since '5 min ago'\n")
Mar 12 18:42:01 nginx[2847]: upstream timed out
Mar 12 18:42:03 nginx[2847]: upstream timed out
 
Upstream backend is timing out. Checking app health...

The problem

Remote workflows require working authentication, network access and session handling. Before using an agent with ssh user@server, check these requirements:

  • Interactive authentication — the client needs a way to handle the prompts your server requires
  • SSH keys on your machine — giving an AI agent access to your private keys is a security nightmare
  • Jump hosts — verify network access, credentials and session handling for each hop
  • Remote interactive tools — once SSH'd in, you need to run htop, vim, tail logs — all interactive

The result: developers SSH in themselves, do the work, then copy-paste findings back to the agent. The agent loses all context of the remote environment.

How agend solves it

Your agent operates from its own isolated Linux machine in the cloud. From there, it can SSH into your infrastructure just like a human operator would:

  • Password auth works — real PTY means SSH password prompts are handled natively via shell_send_raw
  • SSH keys stay in agend — store deploy keys in the agend environment, not on your laptop. Use credentials scoped to the test workflow.
  • Jump hosts / bastion servers — the agent SSHs to the bastion, then SSHs to the target. Nested interactive sessions just work.
  • Remote tools work — once connected, the agent can run htop, tail logs, edit configs, restart services on the remote machine
  • Session persistence — the SSH session stays alive. The agent can do other things and come back to it.

Security model

agend adds a security layer that running SSH from your laptop doesn't have:

  • Isolated origin — SSH connections come from the agend environment, not your workstation. External systems remain reachable with the credentials and permissions you grant.
  • Separate credentials — deploy keys and service accounts live in agend, not in your personal ~/.ssh
  • Workflow records — retain the transcripts and verification evidence your client provides; confirm they meet your requirements
  • Disposable — if something goes wrong, destroy the environment. Your machine is unaffected.

What you can automate

  • Production incident investigation across multiple servers
  • Configuration drift detection and remediation
  • Log aggregation from servers without centralized logging
  • Multi-server deployment verification
  • Database access through SSH tunnels
  • Network equipment management (routers, switches with CLI)

Key MCP tools used

  • shell_exec (interactive) — start SSH sessions
  • shell_send_raw — type passwords, run commands on remote hosts
  • shell_send_raw — send escape sequences, Ctrl+C
  • shell_raw_stdout — read remote terminal output
  • shell_file_put — deploy SSH keys to the environment

Who is this for

  • SREs managing production infrastructure
  • DevOps teams with bastion/jump host architectures
  • Network engineers managing CLI-based equipment
  • Anyone who SSHs into servers regularly

Give your agent secure access to your infrastructure.

Start Free Trial