Skip to main content
Glama
shaike1
by shaike1

MCP SSH 서버

모델 컨텍스트 프로토콜(MCP)을 위한 강력한 SSH 서버 구현입니다. 이 서버는 SSH 프로토콜을 통해 안전한 원격 명령 실행 및 파일 작업을 지원하며, 비밀번호 및 키 기반 인증을 모두 지원합니다.

특징

  • ✨ 안전한 SSH 연결 관리

  • 🔑 비밀번호 및 키 기반 인증

  • 💻 원격 명령 실행

  • 📁 파일 작업(업로드/다운로드)

  • 📊 파일 전송 진행 상황 추적

  • 🔐 권한 관리

  • 📂 디렉토리 작업

  • 🚀 대량 파일 전송

  • 📝 자세한 로깅

Related MCP server: SSH MCP Server

설치

  1. 패키지를 설치하세요:

지엑스피1

  1. Claude 데스크톱 구성( claude_desktop_config.json )에 다음을 추가합니다.

{
  "mcpServers": {
    "ssh": {
      "command": "node",
      "args": ["%APPDATA%/npm/node_modules/mcp-ssh/dist/server.js"],
      "env": {
        "SSH_PORT": "8889",
        "SSH_LOG_LEVEL": "info"
      }
    }
  }
}

용법

비밀번호 인증

$body = @{
    id = "test"
    host = "example.com"
    port = 22
    username = "user"
    password = "pass123"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/connect" -Method Post -Body $body -ContentType "application/json"

키 인증

$body = @{
    id = "test"
    host = "example.com"
    port = 22
    username = "user"
    privateKey = Get-Content ~/.ssh/id_rsa | Out-String
    passphrase = "optional-key-passphrase"  # if your key is protected
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/connect" -Method Post -Body $body -ContentType "application/json"

명령 실행

$execBody = @{
    id = "test"
    command = "ls -la"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/exec" -Method Post -Body $execBody -ContentType "application/json"

파일 작업

# Upload file
$uploadForm = @{
    file = Get-Item -Path "localfile.txt"
    remotePath = "/remote/path/file.txt"
}
Invoke-RestMethod -Uri "http://localhost:8889/upload/test" -Method Post -Form $uploadForm

# Download file
Invoke-RestMethod -Uri "http://localhost:8889/download/test?remotePath=/remote/path/file.txt" -Method Get -OutFile "downloaded.txt"

디렉토리 작업

# List directory
Invoke-RestMethod -Uri "http://localhost:8889/ls/test?path=/remote/path" -Method Get

# Get connection status
Invoke-RestMethod -Uri "http://localhost:8889/status/test" -Method Get

개발

  1. 저장소를 복제합니다.

git clone https://github.com/shaike1/mcp-server-ssh.git
cd mcp-server-ssh
  1. 종속성 설치:

npm install
  1. 짓다:

npm run build
  1. 서버 시작:

npm start

환경 변수

  • SSH_PORT : 서버 포트(기본값: 8889)

  • SSH_LOG_LEVEL : 로깅 레벨(기본값: info)

기여하다

  1. 저장소를 포크하세요

  2. 기능 브랜치를 생성합니다( git checkout -b feature/amazing-feature )

  3. 변경 사항을 커밋하세요( git commit -m 'Add some amazing feature' )

  4. 브랜치에 푸시( git push origin feature/amazing-feature )

  5. 풀 리퀘스트 열기

특허

MIT

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    A Model Context Protocol server implementation that enables secure remote command execution via SSH, with features for managing and using SSH credentials.
    5
    1
    10
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A server that enables remote command execution over SSH through the Model Context Protocol (MCP), supporting both password and private key authentication.
    1
    1
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A local Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH connections.
    6
    25
    2
    -
  • A
    license
    A
    quality
    A
    maintenance
    A Model Context Protocol server that allows LLMs to securely execute shell commands on remote Linux and Windows systems via SSH. It supports password and key-based authentication, command timeouts, and sudo elevation for administrative tasks.
    11
    7,828
    714
    MIT