8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GoでSSH Serverを立ち上げる

Posted at

https://github.com/cloudfoundry-incubator/diego-ssh
は、cloudfoundryのdiegoコンテナにアクセスするためにつくられたものですが、
これを使うことでOpenSSHを使わずに簡単にSSH Serverを立ち上げることができます。

dockerコンテナ内でOpenSSHを使ってSSH Serverを立ち上げようとすると https://docs.docker.com/examples/running_ssh_service/
にあるような操作が必要で、OSによって手順が変わります。(上記はubuntuの手順)
diego-sshは依存関係のないバイナリ(10MB程度)になるので軽量コンテナとの相性がとても良いです。

## go getでインストール
$ go get github.com/cloudfoundry-incubator/diego-ssh/cmd/sshd

## 認証なし、2223ポートでSSH Serverを起動
$ $GOPATH/bin/sshd -allowUnauthenticatedClients -address=":2223"
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?