ClaudeCloudflare Developer PlatformMar 12, 2026, 12:00 AM

Containers - SSH into running Container instances

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

claudeenmodel: claude-sonnet-4-20250514

SSH Access Now Available for Cloudflare Container Instances

Key Points

  • SSH access now available for Container instances
  • Interactive shell and single command execution supported
  • Requires ssh-ed25519 key configuration in wrangler config

Summary

Cloudflare has introduced SSH access for running Container instances through Wrangler CLI, enabling developers to debug, inspect processes, and execute commands directly inside containers.

Key Points

  • Configuration: Enable SSH by setting wrangler_ssh.enabled = true in your container configuration
  • Authentication: Add your ssh-ed25519 public key to the authorized_keys section
  • Interactive Access: Use wrangler containers ssh <INSTANCE_ID> to open an interactive shell
  • Command Execution: Run single commands with wrangler containers ssh <INSTANCE_ID> -- <command>
  • Instance Discovery: Find running container instance IDs using wrangler containers instances <APPLICATION>

Configuration Example

{
  "containers": [{
    "wrangler_ssh": { "enabled": true },
    "authorized_keys": [{
      "name": "<NAME>",
      "public_key": "<YOUR_PUBLIC_KEY_HERE>"
    }]
  }]
}

Full Translation

Translations

A translation section that keeps the flow of the original article.

claudejamodel: claude-sonnet-4-20250514

Containers - 実行中のContainerインスタンスへのSSH接続

実行中のContainerインスタンスへのSSH接続

2026年3月12日

Wranglerを使用して実行中のContainerインスタンスにSSH接続できるようになりました。これは、デバッグ、実行中のプロセスの検査、またはContainer内でのワンオフコマンドの実行に便利です。

接続方法

接続するには、Containerの設定でwrangler_sshを有効にし、authorized_keysにssh-ed25519公開鍵を追加します:

wrangler.jsonc

{
  "containers": [
    {
      "wrangler_ssh": {
        "enabled": true
      },
      "authorized_keys": [
        {
          "name": "<NAME>",
          "public_key": "<YOUR_PUBLIC_KEY_HERE>"
        }
      ]
    }
  ]
}

wrangler.toml

[[containers]]
[containers.wrangler_ssh]
enabled = true

[[containers.authorized_keys]]
name = "<NAME>"
public_key = "<YOUR_PUBLIC_KEY_HERE>"

次に以下のコマンドで接続します:

wrangler containers ssh <INSTANCE_ID>

単一コマンドの実行

インタラクティブシェルを開かずに単一のコマンドを実行することも可能です:

wrangler containers ssh <INSTANCE_ID> -- ls -al

インスタンスIDの確認

実行中のContainerのインスタンスIDを確認するには、wrangler containers instances <APPLICATION>を使用してください。

詳細については、[SSHドキュメント](SSH documentation)を参照してください。