Overseas access: www.kdjingpai.com
Bookmark Us

SSHAI is an open source tool. It lets users connect to AI services via the SSH protocol. Users can use large language models in any environment that supports SSH. The tool supports models such as DeepSeek and Hunyuan. The connection method is secure and includes password and public key authentication. The interface is friendly, with colorful output and animation effects. Configuration is simple, using YAML files to set the API key and prompt words. The project is developed in Go language, modular design is easy to extend. Users can see the model thinking process in real time. The tool supports MCP protocol and integrates external tools such as file system and network search. Show welcome page at startup . The project is open source on GitHub under the Apache 2.0 license. Users can directly clone the code to compile and run . The open source version provides a test server , users connect to experience through the ssh command . Official have paid multi-user version.

Function List

  • SSH secure connection: Encrypted access to AI services with SSH protocol, support for port customization and background operation.
  • Flexible Certification: Supports password login, SSH public key passwordless login and no authentication mode, compatible with RSA and Ed25519 keys.
  • Multi-model support: Integration of DeepSeek, Hunyuan and other big models, with switchable local or cloud API endpoints.
  • Real-time Thinking Display: The model generates responses with real-time display of the thinking steps, such as the reasoning process of DeepSeek R1.
  • MCP Tool Integration: Support for Model Context Protocol to connect to external tools, including time lookups, file reading and writing, and Bing search.
  • Beautiful interface: Color terminal output, animation effects and ASCII art to enhance the interactive experience.
  • configuration management: Set API keys, prompt words and tool parameters with YAML files, support dynamic loading of configuration files.
  • multilingual interface: Provide Chinese and English switching to adapt to different user habits.
  • interactive mode: Three types of invocations, including interactive chat, single-command execution, and pipeline input processing.
  • Welcome page and monitoring: Startup displays a customized banner and a built-in retry mechanism ensures a stable connection.

Using Help

SSHAI is a command line tool. Users need Go environment to compile and run it. It does not have a complex installation. The whole process starts with cloning the code. Users first prepare Git and Go tools. Then step by step, it connects to the AI service. The tools run on a local server. Users access it with ssh command. Here are the detailed steps.

Installation process

  1. clone warehouseThe
    Open the terminal. Enter the command Clone Code.

    git clone https://github.com/sshllm/sshai.git  
    cd sshai
    

    This will download all files, including the main program and configuration examples. The repository size is small and downloads quickly.

  2. compilation programThe
    SSHAI is written in Go. Make sure Go 1.20 or later is installed. Run the make command to compile.

    make build
    

    Or just use go build.

    go build -o sshai cmd/main.go
    

    After compilation, generate the executable file sshai. placed in the PATH path, easy to call. If you use Windows, use go build to generate the exe file.

  3. Configuring YAML filesThe
    Copy the example file config.yaml. edit it to set the parameters. The file is in the root directory. The key sections are included:

    • API endpoints: e.g. DeepSeek's URL and key. Example:
      models:  
      deepseek:  
      api_key: "your-api-key"  
      base_url: "https://api.deepseek.com"
      
    • Authentication settings: username and password, or public key path. Example:
      auth:  
      username: "user"  
      password: "pass"  # 或用 public_keys: ["/path/to/key"]
      
    • Prompt word customization: Define system prompts, such as "As an AI assistant, help users solve problems".
    • MCP Tools: enable file system tools to set path restrictions. Example:
      mcp_tools:  
      filesystem:  
      enabled: true  
      root: "/safe/dir"
      

    Save the configuration to take effect. The English version uses config-en.yaml.

  4. Generate SSH key (optional)The
    If using public key authentication, generate a key pair. Run:

    ssh-keygen -t ed25519 -C "your-email"
    

    Copy the public key to the authorized_keys file. Set it up on the server side. The tool recognizes the key automatically.

Operations Server

After compilation, the SSHAI server is started. It listens on the port and provides AI services. The default port is 2213.

  1. run directlyThe
    Executed in the sshai directory:

    ./sshai
    

    Server startup. Welcome banners are displayed, such as ASCII art and version information. Logs are output to the terminal.

  2. Specifying configuration filesThe
    Load custom configurations with the -c parameter:

    ./sshai -c config.yaml
    

    This overrides the default settings.

  3. background operationThe
    Production environments use nohub or redirect logs:

    nohup ./sshai > server.log 2>&1 &
    

    Or use a script:

    ./scripts/run.sh
    

    The script handles startup and logging. Check the process: ps aux | grep sshai.

  4. test connectionThe
    Test the server experience with open source, no need to run it locally:

    ssh test.sshai.top -p 9527
    

    Enter the user name and password. Enter the interactive mode.

Connecting and using AI services

Once the server is running, connect with the ssh client. The tool supports three modes. Choose the one that suits the scenario.

  1. interactive modeThe
    Open a new terminal. Connect to the local server:

    ssh user@localhost -p 2213
    

    Enter a password or use a key. Enter the chat screen. Prompts such as "AI>". Enter a question such as "Interpreting Python lists". the AI response is displayed in real time, including the thought chain. Exit with exit or Ctrl+D.
    Sample dialog:

    • User: Write a Hello World script.
    • AI: Generate code and interpret each line. Supports multiple rounds of dialog with context preservation.
  2. command-line modeThe
    Execute a single command without interaction:

    ssh user@localhost -p 2213 "分析这段JSON数据"
    

    Pass parameters as hints. Output directly to the terminal. Good for script automation. Add -p parameter to skip host checking:

    ssh -p 2213 -o StrictHostKeyChecking=no user@localhost "你的问题"
    
  3. Pipeline ModeThe
    Processes input streams, such as file contents:

    cat data.txt | ssh user@localhost -p 2213
    

    or in combination with echo:

    echo "优化这个SQL查询" | ssh user@localhost -p 2213
    

    AI analyzes pipeline input and generates output. Used for log parsing or code review.

Featured Function Operation

  • Real-time Thinking Display. Enabled by default. In interactive mode, models such as DeepSeek R1 will output "Thinking..." and then step. Set in Configuration:
    display:  
    thinking: true
    

    Help users understand AI decisions.

  • MCP Tool Use.. When enabled, the AI can invoke the tool. Example: Add Bing tool to the configuration. When chatting, say "Search for the latest AI news". the AI automatically calls the fetch tool and returns the results. Example of the file tool:
    • User: Reads the contents of the file.
    • AI: Access /root/file.txt with the filesystem tool to display the contents. Securely restrict the root directory to avoid sensitive operations.
  • Customized tips. Edit the prompts section of YAML. System prompts like "Respond to technical questions in Chinese". User prompt prefix customization to improve response quality.
  • Multi-model switching. Configure multiple models. Specify at runtime:
    ssh user@localhost -p 2213 -m deepseek "问题"
    

    The tool is dynamically loaded and the response time depends on the model.

Handling Precautions

  • safety. Use a strong password or key. Firewalls open port 2213. avoid public network exposure unless using a VPN.
  • performances. Local operation requires GPU support for large models. Cloud API has quota restrictions.
  • adjust components during testingThe logs are in server.log. Logs are in server.log. common error: invalid API key, restart server.
  • extensionsThe Modules are in the internal directory. Add new tools, modify mcp package. Contribute PR to GitHub.
  • mobile. Use Termux app to run ssh command on Android to connect.

These steps get users up to speed quickly. Test servers help newbies get familiarized. Flexible configuration, suitable for individuals or teams. Stable operation and fast response. User feedback shows that the pipeline mode is particularly useful.

application scenario

  1. Remote Development Assistance
    Developers generate code snippets or debug scripts with SSHAI in GUI-less environments such as servers. Enter bug logs through pipeline mode and AI quickly analyzes the cause.
  2. System Operation and Maintenance
    Ops engineers connect tools to query server status or optimize configurations.MCP tool integrates file reads and writes, AI suggests automated scripts to reduce manual operations.
  3. Educational learning
    Students practice AI interactions at the terminal. Real-time think-aloud display helps understand model reasoning. Switch between English and Chinese for non-native users to learn programming concepts.
  4. Teamwork
    Teams deploy a multi-user version. Each member logs in with a public key and shares prompt templates. Used for brainstorming sessions where AI summarizes discussion points.
  5. Content generation
    Writers or analysts pipe in drafts and AI touches up the text. Long context is supported to generate report or article outlines.

QA

  1. What environment does SSHAI need to run?
    Requires Go 1.20+ and Git. Linux, macOS and Windows are supported. Compiles with no dependencies.
  2. How do I add a new AI model?
    Edit the models section of config.yaml. Add the API URL and key. Restart the server to take effect.
  3. What authentication methods does the tool support?
    Password, SSH public key and no authentication. Public key recommended for automation scripts.
  4. Difference between open source and paid version?
    The open source version is single user and suitable for individuals. The paid version is at sshllm.top and supports multiple users and advanced administration.
  5. What about connection failures?
    Check ports, firewalls and logs. Common is key permissions, use chmod 600 to set the private key.
0Bookmarked
0kudos

Recommended

Can't find AI tools? Try here!

Just type in the keyword Accessibility Bing SearchYou can quickly find all the AI tools on this site.

Top

en_USEnglish