VOOZH about

URL: https://glama.ai/mcp/servers/YawLabs/ssh-mcp?locale=ko-KR

⇱ SSH MCP μ„œλ²„ by YawLabs | Glama


@yawlabs/ssh-mcp

πŸ‘ npm version
πŸ‘ License: MIT

AI 도ꡬλ₯Ό μœ„ν•œ SSH ν™˜κ²½μ„ κ΅¬μΆ•ν•˜μ„Έμš”. SSH ν™˜κ²½μ„ κ΄€λ¦¬ν•˜κ³ , 문제λ₯Ό 진단 및 ν•΄κ²°ν•˜λ©°, μ—μ΄μ „νŠΈμ—κ²Œ λͺ¨λ“  것에 λŒ€ν•œ 원격 μ•‘μ„ΈμŠ€ κΆŒν•œμ„ λΆ€μ—¬ν•˜λŠ” MCP μ„œλ²„μž…λ‹ˆλ‹€.

Yaw Labsμ—μ„œ ꡬ좕 및 μœ μ§€ κ΄€λ¦¬ν•©λ‹ˆλ‹€.

문제점

AI CLI λ„κ΅¬λŠ” SSHκ°€ μ§€μ†μ μœΌλ‘œ λŠκΈ°λŠ” ν•˜μœ„ ν”„λ‘œμ„ΈμŠ€μ—μ„œ μ‹€ν–‰λ©λ‹ˆλ‹€. μ—μ΄μ „νŠΈκ°€ git pull을 μ‹œλ„ν•˜λ©΄ Permission denied (publickey) 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€. μ„œλ²„μ— SSH둜 μ ‘μ†ν•˜λ €κ³  ν•˜λ©΄ μ—μ΄μ „νŠΈ μ†ŒμΌ“μ΄ λ§Œλ£Œλ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. 배포λ₯Ό μ‹œλ„ν•˜λ©΄ μΈμŠ€ν„΄μŠ€κ°€ μž¬μƒμ„±λ˜μ–΄ 호슀트 ν‚€κ°€ λ³€κ²½λ©λ‹ˆλ‹€. 맀번 AIλŠ” 무엇이 잘λͺ»λ˜μ—ˆλŠ”μ§€ μ•Œμ§€ λͺ»ν•˜κ³  ν—€λ§€κ²Œ λ©λ‹ˆλ‹€.

μ΄λŸ¬ν•œ λ¬Έμ œλŠ” SSH ν‚€κ°€ ν•„μš”ν•œ λͺ¨λ“  μƒν™©μ—μ„œ λ°œμƒν•©λ‹ˆλ‹€:

  • Git β€” clone, pull, push, fetch, submodules, LFS

  • νŒ¨ν‚€μ§€ κ΄€λ¦¬μž β€” λΉ„κ³΅κ°œ μ €μž₯μ†Œμ—μ„œμ˜ npm install, pip install, go get, cargo, composer

  • μ„œλ²„ μ•‘μ„ΈμŠ€ β€” SSH, SCP, SFTP, rsync

  • 터널링 β€” λ°μ΄ν„°λ² μ΄μŠ€λ‘œμ˜ 포트 ν¬μ›Œλ”©, SOCKS ν”„λ‘μ‹œ

  • 배포 β€” Ansible, Terraform, Capistrano, 배포 슀크립트

  • ν΄λΌμš°λ“œ β€” AWS EC2, GCP, Azure, DigitalOcean, λͺ¨λ“  VPS

ssh-mcpκ°€ 이 문제λ₯Ό ν•΄κ²°ν•©λ‹ˆλ‹€. SSH μ—μ΄μ „νŠΈλ₯Ό κ΄€λ¦¬ν•˜κ³ , ν‚€λ₯Ό λ‘œλ“œν•˜λ©°, 였λ₯˜ λ°œμƒ μ‹œ μ‹€ν–‰ κ°€λŠ₯ν•œ μˆ˜μ • λͺ…λ Ήμ–΄λ₯Ό μ§„λ‹¨ν•˜κ³ , 원격 μž‘μ—…μ„ μ œκ³΅ν•©λ‹ˆλ‹€. 이 λͺ¨λ“  것이 AI μ—μ΄μ „νŠΈκ°€ ν˜ΈμΆœν•  수 μžˆλŠ” MCP λ„κ΅¬λ‘œ μ œκ³΅λ©λ‹ˆλ‹€.

λΉ λ₯Έ μ‹œμž‘

npm install -g @yawlabs/ssh-mcp

MCP ν΄λΌμ΄μ–ΈνŠΈ 섀정에 μΆ”κ°€ν•˜μ„Έμš”:

{
 "mcpServers": {
 "ssh": {
 "command": "ssh-mcp"
 }
 }
}

도ꡬ

SSH ν™˜κ²½ 관리

git, 배포, 터널링 λ“± λͺ¨λ“  μž‘μ—…μ΄ μ€‘λ‹¨λ˜μ§€ μ•Šλ„λ‘ 둜컬 SSH 섀정을 μˆ˜μ •ν•˜λŠ” λ„κ΅¬μž…λ‹ˆλ‹€.

도ꡬ

μ„€λͺ…

ssh_agent_ensure

ssh-agentκ°€ μ‹€ν–‰ 쀑인지 ν™•μΈν•©λ‹ˆλ‹€. ν•„μš”μ‹œ μ‹œμž‘ν•˜κ³  μ„Έμ…˜μ— λŒ€ν•œ ν™˜κ²½ λ³€μˆ˜λ₯Ό μ„€μ •ν•©λ‹ˆλ‹€.

ssh_key_list

~/.ssh/에 μžˆλŠ” λͺ¨λ“  SSH ν‚€λ₯Ό μœ ν˜•, μ§€λ¬Έ, μ—μ΄μ „νŠΈ μƒνƒœμ™€ ν•¨κ»˜ λ‚˜μ—΄ν•©λ‹ˆλ‹€.

ssh_key_load

μ‹€ν–‰ 쀑인 μ—μ΄μ „νŠΈμ— ν‚€λ₯Ό λ‘œλ“œν•©λ‹ˆλ‹€. λ¨Όμ € μ—μ΄μ „νŠΈκ°€ μ‹œμž‘λ˜μ—ˆλŠ”μ§€ ν™•μΈν•©λ‹ˆλ‹€.

ssh_config_lookup

ν˜ΈμŠ€νŠΈμ— λŒ€ν•œ μœ νš¨ν•œ SSH μ„€μ •(호슀트λͺ…, μ‚¬μš©μž, 포트, ν”„λ‘μ‹œ, ID 파일)을 ν™•μΈν•©λ‹ˆλ‹€.

ssh_known_hosts_fix

였래된 호슀트 ν‚€λ₯Ό μ œκ±°ν•˜κ³  λ‹€μ‹œ μŠ€μΊ”ν•©λ‹ˆλ‹€. "host key verification failed" 였λ₯˜λ₯Ό μˆ˜μ •ν•©λ‹ˆλ‹€.

ssh_git_check

GitHub, GitLab, Bitbucket 등에 λŒ€ν•œ Git-over-SSH 인증을 ν…ŒμŠ€νŠΈν•©λ‹ˆλ‹€.

ssh_test

타이밍 및 μ‹€ν–‰ κ°€λŠ₯ν•œ 였λ₯˜ μ„ΈλΆ€ 정보와 ν•¨κ»˜ λΉ λ₯Έ μ—°κ²° ν…ŒμŠ€νŠΈλ₯Ό μˆ˜ν–‰ν•©λ‹ˆλ‹€.

진단

도ꡬ

μ„€λͺ…

ssh_diagnose

전체 SSH ν™˜κ²½ 진단. μ—μ΄μ „νŠΈ, ν‚€, μ„€μ •, known_hosts 및 μ—°κ²° μƒνƒœλ₯Ό ν™•μΈν•©λ‹ˆλ‹€. λͺ¨λ“  였λ₯˜μ— λŒ€ν•΄ μ •ν™•ν•œ μˆ˜μ • λͺ…λ Ήμ–΄λ₯Ό λ°˜ν™˜ν•©λ‹ˆλ‹€.

원격 μž‘μ—…

도ꡬ

μ„€λͺ…

ssh_exec

원격 ν˜ΈμŠ€νŠΈμ—μ„œ λͺ…령을 μ‹€ν–‰ν•©λ‹ˆλ‹€. stdout, stderr 및 μ’…λ£Œ μ½”λ“œλ₯Ό λ°˜ν™˜ν•©λ‹ˆλ‹€.

ssh_read_file

SFTPλ₯Ό 톡해 원격 ν˜ΈμŠ€νŠΈμ—μ„œ νŒŒμΌμ„ μ½μŠ΅λ‹ˆλ‹€.

ssh_write_file

SFTPλ₯Ό 톡해 원격 호슀트의 νŒŒμΌμ— λ‚΄μš©μ„ μ”λ‹ˆλ‹€.

ssh_upload

SFTPλ₯Ό 톡해 둜컬 νŒŒμΌμ„ 원격 ν˜ΈμŠ€νŠΈμ— μ—…λ‘œλ“œν•©λ‹ˆλ‹€.

ssh_download

원격 ν˜ΈμŠ€νŠΈμ—μ„œ 둜컬 파일 μ‹œμŠ€ν…œμœΌλ‘œ νŒŒμΌμ„ λ‹€μš΄λ‘œλ“œν•©λ‹ˆλ‹€.

ssh_ls

원격 호슀트의 디렉토리에 μžˆλŠ” 파일 λͺ©λ‘μ„ ν™•μΈν•©λ‹ˆλ‹€.

μƒμœ„ μˆ˜μ€€ μž‘μ—…

ssh_execλ₯Ό μ‚¬μš©ν•˜μ—¬ μ—μ΄μ „νŠΈκ°€ κ΅¬μΆ•ν•˜λŠ” 일반적인 νŒ¨ν„΄μ„ λž˜ν•‘ν•˜μ—¬ 더 λΉ λ₯΄κ³  였λ₯˜κ°€ 적은 λ„κ΅¬μž…λ‹ˆλ‹€.

도ꡬ

μ„€λͺ…

ssh_multi_exec

μ—¬λŸ¬ ν˜ΈμŠ€νŠΈμ—μ„œ λ™μ‹œμ— λͺ…령을 μ‹€ν–‰ν•©λ‹ˆλ‹€. ν˜ΈμŠ€νŠΈλ³„ κ²°κ³Όλ₯Ό λ°˜ν™˜ν•©λ‹ˆλ‹€.

ssh_find

κ΅¬μ‘°ν™”λœ λ§€κ°œλ³€μˆ˜(이름, μœ ν˜•, 크기, 깊이)λ₯Ό μ‚¬μš©ν•˜μ—¬ μ›κ²©μœΌλ‘œ νŒŒμΌμ„ κ²€μƒ‰ν•©λ‹ˆλ‹€.

ssh_tail

파일의 λ§ˆμ§€λ§‰ N쀄을 읽으며, μ„ νƒμ μœΌλ‘œ grep νŒ¨ν„΄μœΌλ‘œ ν•„ν„°λ§ν•©λ‹ˆλ‹€.

ssh_service_status

systemd μ„œλΉ„μŠ€ μƒνƒœ(ν™œμ„±, PID, 가동 μ‹œκ°„, μ„€λͺ…)λ₯Ό ν™•μΈν•©λ‹ˆλ‹€.

μžλ™ 진단

원격 μž‘μ—…μ΄ μ‹€νŒ¨ν•˜λ©΄ ssh-mcpκ°€ μžλ™μœΌλ‘œ 진단을 μ‹€ν–‰ν•˜κ³  였λ₯˜ 응닡에 κ²°κ³Όλ₯Ό ν¬ν•¨ν•©λ‹ˆλ‹€. μ—μ΄μ „νŠΈκ°€ λ³„λ„λ‘œ ssh_diagnoseλ₯Ό ν˜ΈμΆœν•  ν•„μš”κ°€ μ—†μœΌλ©°, 였λ₯˜ λ©”μ‹œμ§€μ—μ„œ λ°”λ‘œ 무엇이 잘λͺ»λ˜μ—ˆκ³  μ–΄λ–»κ²Œ μˆ˜μ •ν•΄μ•Ό ν•˜λŠ”μ§€ μ•Œ 수 μžˆμŠ΅λ‹ˆλ‹€.

μ—°κ²° 풀링

원격 μž‘μ—…μ€ SSH 연결을 μžλ™μœΌλ‘œ μž¬μ‚¬μš©ν•©λ‹ˆλ‹€. μ—μ΄μ „νŠΈκ°€ λ™μΌν•œ ν˜ΈμŠ€νŠΈμ— μ—¬λŸ¬ 번 ν˜ΈμΆœν•˜λ©΄ 첫 번째 호좜이 연결을 μ—΄κ³  후속 ν˜ΈμΆœμ€ 이λ₯Ό μž¬μ‚¬μš©ν•©λ‹ˆλ‹€. 연결은 λ§ˆμ§€λ§‰ μ‚¬μš© ν›„ 60초 λ™μ•ˆ μœ μ§€λœ λ‹€μŒ μžλ™μœΌλ‘œ λ‹«νž™λ‹ˆλ‹€.

SSH μ„€μ • 지원

λͺ¨λ“  연결은 ~/.ssh/configλ₯Ό μ€€μˆ˜ν•©λ‹ˆλ‹€. 호슀트 별칭, μ‚¬μš©μž μ§€μ • 포트, μ‚¬μš©μž 이름, ID 파일 및 ProxyJump 섀정이 μžλ™μœΌλ‘œ μ‚¬μš©λ©λ‹ˆλ‹€. SSH 섀정에 Host myserverκ°€ κ΅¬μ„±λ˜μ–΄ μžˆλ‹€λ©΄ host: "myserver"만 μ „λ‹¬ν•˜λ©΄ ssh-mcpκ°€ λͺ¨λ“  것을 ν•΄κ²°ν•©λ‹ˆλ‹€.

ProxyJump / 배슀천 ν˜ΈμŠ€νŠΈλŠ” μžλ™μœΌλ‘œ μ§€μ›λ©λ‹ˆλ‹€. SSH 섀정에 ν˜ΈμŠ€νŠΈμ— λŒ€ν•œ ProxyJump bastion이 μžˆλŠ” 경우, ssh-mcpλŠ” λ°°μŠ€μ²œμ„ 톡해 투λͺ…ν•˜κ²Œ μ—°κ²°ν•©λ‹ˆλ‹€. 체인 ν”„λ‘μ‹œλ„ μž‘λ™ν•©λ‹ˆλ‹€.

호슀트 ν‚€ 확인

λͺ¨λ“  원격 μž‘μ—…μ€ μ„œλ²„μ˜ 호슀트 ν‚€λ₯Ό ~/.ssh/known_hosts와 λΉ„κ΅ν•˜μ—¬ ν™•μΈν•©λ‹ˆλ‹€:

  • μ•Œλ €μ§„ 호슀트, ν‚€ 일치 β€” 수락.

  • μ•Œλ €μ§„ 호슀트, ν‚€ 변경됨 β€” κ±°λΆ€ (MITM 보호).

  • μ•Œλ €μ§€μ§€ μ•Šμ€ 호슀트 β€” 첫 μ—°κ²° μ‹œ 수락 (TOFU). ν–₯ν›„ 뢈일치 감지λ₯Ό μœ„ν•΄ ν‚€λ₯Ό κ³ μ •ν•˜λ €λ©΄ ssh_known_hosts_fixλ₯Ό μ‚¬μš©ν•˜μ„Έμš”.

더 μ—„κ²©ν•œ ν™˜κ²½μ˜ 경우 SSH_MCP_STRICT_HOST_KEY=1을 μ„€μ •ν•˜μ—¬ μ•Œλ €μ§€μ§€ μ•Šμ€ 호슀트λ₯Ό κ±°λΆ€ν•˜μ„Έμš”. λ¨Όμ € ssh_known_hosts_fixλ₯Ό μ‚¬μš©ν•˜μ—¬ λͺ…μ‹œμ μœΌλ‘œ μΆ”κ°€ν•˜μ‹­μ‹œμ˜€.

진단 도ꡬ(ssh_test, ssh_diagnose)λŠ” ν”„λ‘œλΈŒ λͺ…령에 StrictHostKeyChecking=noλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. μ΄λŸ¬ν•œ ν”„λ‘œλΈŒλŠ” echo SSH_OK만 μ‹€ν–‰ν•˜λ©° 자격 증λͺ…μ΄λ‚˜ 데이터가 μ „λ‹¬λ˜μ§€ μ•ŠμœΌλ―€λ‘œ μ—°κ²° ν…ŒμŠ€νŠΈμ— μ•ˆμ „ν•©λ‹ˆλ‹€. μ‹€μ œ μž‘μ—…μ€ 항상 hostVerifierλ₯Ό κ±°μΉ©λ‹ˆλ‹€.

Windows 지원

Windowsμ—μ„œ ssh-mcpλŠ” OpenSSH 인증 μ—μ΄μ „νŠΈ μ„œλΉ„μŠ€λ₯Ό μžλ™μœΌλ‘œ κ°μ§€ν•©λ‹ˆλ‹€(\.pipeopenssh-ssh-agent λͺ…λͺ…λœ νŒŒμ΄ν”„λ₯Ό 톡해). SSH_AUTH_SOCK이 ν•„μš”ν•˜μ§€ μ•ŠμœΌλ©°, OpenSSH μ—μ΄μ „νŠΈ μ„œλΉ„μŠ€κ°€ μ‹€ν–‰ 쀑인지 ν™•μΈν•˜κΈ°λ§Œ ν•˜λ©΄ λ©λ‹ˆλ‹€.

인증

λͺ¨λ“  원격 μž‘μ—…μ€ μ—°κ²° λ§€κ°œλ³€μˆ˜λ₯Ό ν—ˆμš©ν•©λ‹ˆλ‹€:

λ§€κ°œλ³€μˆ˜

μ„€λͺ…

κΈ°λ³Έκ°’

host

SSH 호슀트λͺ… λ˜λŠ” IP (ν•„μˆ˜)

β€”

port

SSH 포트

SSH μ„€μ • λ˜λŠ” 22

username

SSH μ‚¬μš©μž 이름

SSH μ„€μ • λ˜λŠ” ν˜„μž¬ μ‚¬μš©μž

privateKeyPath

SSH 개인 ν‚€ 경둜

μžλ™ 감지

password

SSH λΉ„λ°€λ²ˆν˜Έ (ν‚€ ꢌμž₯)

β€”

인증 ν•΄κ²° μˆœμ„œ: ssh-mcpλŠ” 이 λͺ©λ‘μ—μ„œ 첫 번째 일치 ν•­λͺ©μ„ μ„ νƒν•˜λ©° 이후 ν•­λͺ©μœΌλ‘œ λ„˜μ–΄κ°€μ§€ μ•ŠμœΌλ―€λ‘œ 인증 방법이 결정둠적이고 예츑 κ°€λŠ₯ν•©λ‹ˆλ‹€.

  1. λͺ…μ‹œμ  privateKeyPath

  2. λͺ…μ‹œμ  password

  3. ssh-agent (Unix의 SSH_AUTH_SOCK, Windows의 \.pipeopenssh-ssh-agent)

  4. ν˜ΈμŠ€νŠΈμ— λŒ€ν•œ ~/.ssh/config의 ID 파일

  5. κΈ°λ³Έ ν‚€ 경둜 (~/.ssh/id_ed25519, id_rsa, id_ecdsa)

μ˜ˆμ‹œ μ›Œν¬ν”Œλ‘œμš°

μ—μ΄μ „νŠΈκ°€ git pull을 ν•  수 μ—†λŠ” 경우

Agent calls ssh_git_check β†’ "Permission denied. Your SSH key is not registered with github.com."
Agent calls ssh_key_list β†’ finds id_ed25519 exists but is not loaded
Agent calls ssh_key_load("~/.ssh/id_ed25519") β†’ "Key loaded"
Agent calls ssh_git_check β†’ "Git SSH authentication to github.com succeeded as username"
Agent runs git pull β†’ works

μΈμŠ€ν„΄μŠ€ μž¬μƒμ„± ν›„ 호슀트 ν‚€κ°€ λ³€κ²½λœ 경우

Agent calls ssh_exec on server β†’ error: "Host key verification failed"
 (auto-diagnostics included in error: "Fix with ssh_known_hosts_fix")
Agent calls ssh_known_hosts_fix("my-server") β†’ "Host key refreshed"
Agent calls ssh_exec β†’ works

μƒˆ μ„œλ²„μ— λŒ€ν•œ 첫 μ—°κ²°

Agent calls ssh_test("new-server") β†’ "Connection refused at new-server:22"
Agent calls ssh_diagnose("new-server") β†’ full report showing agent running, keys loaded, but host unreachable
Agent reports: "SSH server isn't running on new-server or port 22 is blocked"

ν”„λ‘œκ·Έλž˜λ° 방식 μ‚¬μš©

import { connect, exec, diagnose, ensureAgent, listSshKeys, checkGitSsh, ConnectionPool } from '@yawlabs/ssh-mcp';

// Fix SSH environment
const agent = ensureAgent();
console.log(agent.message);

// Check git access
const git = checkGitSsh('github.com');
console.log(git.message);

// List available keys
const keys = listSshKeys();
for (const key of keys) {
 console.log(`${key.name} (${key.type}) - ${key.loadedInAgent ? 'loaded' : 'not loaded'}`);
}

// Run a remote command (one-off)
const client = await connect({ host: 'my-server', username: 'deploy' });
const result = await exec(client, 'uptime');
console.log(result.stdout);
client.end();

// Run multiple commands with connection pooling
const pool = new ConnectionPool();
await pool.withConnection({ host: 'my-server' }, async (client) => {
 const r1 = await exec(client, 'uptime');
 console.log(r1.stdout);
});
// Connection stays open for 60s β€” next call reuses it
await pool.withConnection({ host: 'my-server' }, async (client) => {
 const r2 = await exec(client, 'df -h');
 console.log(r2.stdout);
});
pool.drain(); // close all connections when done

// Diagnose issues
const report = diagnose('my-server');
console.log(report.overall); // "ok" | "warning" | "error"
for (const check of report.checks) {
 console.log(`[${check.status}] ${check.name}: ${check.message}`);
}

μš”κ΅¬ 사항

  • Node.js 18+

  • SSH ν΄λΌμ΄μ–ΈνŠΈ μ„€μΉ˜λ¨ (진단 및 ν™˜κ²½ κ΄€λ¦¬μš©)

λΌμ΄μ„ μŠ€

MIT

A
license - permissive license
A
quality
A
maintenance

Maintenance

–Maintainers
<1hResponse time
3dRelease cycle
18Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YawLabs/ssh-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server