Archive for the ‘Go言語’ Category
![](https://www.lancard.com/blog/wp-content/themes/default/img/icon/murabe.jpg)
Go言語のお勉強でSSHクライアント
次の案件でGo言語を使いたいと思って勉強しているmuraveさん、サーバー間連携で使うかもしれないと”golang.org/x/crypto/ssh”を使用するサンプルを作ることにしました。
Golangでターミナル接続できるsshクライアントコマンドを作成する(制御キー対応) | 俺的備忘録 〜なんかいろいろ〜
上記の記事を参考にしてSSHクライアントを書いてみました。
コマンドラインの解析にはflagパッケージを使用し、公開鍵認証のみ対応です。
![Share on Facebook Facebook](https://www.lancard.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](https://www.lancard.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share on Linkedin linkedin](https://www.lancard.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/linkedin.png)
![Share on tumblr tumblr](https://www.lancard.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/tumblr.png)
![Share by email mail](https://www.lancard.com/blog/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/mail.png)