Chat-Driven Remote AI Interaction with Claude via SSH
detail.loadingPreview
Automate interactions with a private Claude AI instance running on a remote server directly from any chat application. This workflow bridges real-time chat input with secure SSH command execution, bringing your custom AI tools to life with seamless automation.
About This Workflow
This powerful n8n workflow provides a robust solution for integrating a custom, self-hosted, or otherwise remote Claude AI instance directly into your daily chat interactions. It eliminates the need for manual server access or complex API integrations by using secure SSH commands to execute your Claude script on a remote machine. When a chat message is received, n8n dynamically passes the input as a prompt to your Claude instance, captures its output, and makes it available for further processing. This offers unparalleled control over your AI environment, allowing for tailored responses, data privacy, and the ability to leverage specialized AI setups directly from a convenient chat interface.
Key Features
- Chat Integration: Trigger AI interactions directly from incoming chat messages using the Langchain Chat Trigger.
- Secure Remote Execution: Execute custom commands on a remote server via SSH, maintaining security and control over your AI environment.
- Dynamic Prompting: Pass chat input dynamically as a prompt to your server-side Claude instance.
- Output Capture: Automatically capture and process the standard output (response) from your remote AI command.
- Custom AI Access: Ideal for interacting with self-hosted Large Language Models or specialized AI tools.
How To Use
- "When chat message received" Node:
- Ensure the 'Public' option is checked if you want external chat services to trigger this workflow.
- This node will automatically capture the incoming chat message as
{{ $json.chatInput }}.
- "Execute a command" Node:
- Credentials: Select or create an SSH password or private key credential to connect to your remote server.
- Command: Replace
claude -p "{{ $json.chatInput }}"with the actual command to run your Claude instance or script. Ensure the-pflag or equivalent correctly accepts the prompt. - CWD (Current Working Directory): Update
/your_working_directoryto the absolute path where yourclaudeexecutable or script resides on the remote server.
- "Edit Fields1" Node:
- This node is pre-configured to capture the
stdout(standard output) from the SSH command and assign it to a new field namedoutput. Thisoutputcan then be used by subsequent nodes in your workflow, for example, to send the AI's response back to the chat.
- This node is pre-configured to capture the
Apps Used
Workflow JSON
{
"id": "19cc8783-4f26-4b95-9748-7b6fb3bae7b1",
"name": "Chat-Driven Remote AI Interaction with Claude via SSH",
"nodes": 26,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 19cc8783-4f26...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Related Workflows
Discover more workflows you might like
Effortless Bug Reporting: Slack Slash Command to Linear Issue
Streamline your bug reporting process by instantly creating Linear issues directly from Slack using a simple slash command. This workflow enhances team collaboration by providing immediate feedback and a structured approach to logging defects, saving valuable time for development and QA teams.
Build a Custom OpenAI-Compatible LLM Proxy with n8n
This workflow transforms n8n into a powerful OpenAI-compatible API proxy, allowing you to centralize and customize how your applications interact with various Large Language Models. It enables a unified interface for diverse AI capabilities, including multimodal input handling and dynamic model routing.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.