Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
サーバへの接続を楽にしてくれるツールを作ってみた
Search
kenji sakoda
May 27, 2019
Technology
680
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
サーバへの接続を楽にしてくれるツールを作ってみた
sshコマンドでサーバパスワードを覚えてなくても接続してくれるツールを作った際の背景や使ったツール・ライブラリを紹介しています。
kenji sakoda
May 27, 2019
Other Decks in Technology
See All in Technology
アプリログインとWeb認証基盤をつなぐ ASWebAuthenticationSession 作法
shimastripe
1
290
20260912_スクフェス三河
kgnkhkr
0
350
Gitは怖い?共有ワークスペースから始めるSnowflakeチーム開発
coco_se
0
200
OpenTelemetryのメトリクスをCloudWatchに送ってPromQLで見てみた
ota1022
0
140
ユーザー価値を届け続けるためにウォンテッドリーが大切にしている文化
kotaminato
0
130
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
4
1.2k
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
2.8k
Snowflakeで実現する全社横断の顧客の声(VOC)分析・活用基盤@Snowflake World Tour Tokyo 2026
yuto16
0
200
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
150
Sigmaで作る業務アプリ
kazushiro_honma
0
130
なぜJMBC(Japan MCP Business Community)? MCPってどう活用できるの?
cdataj
0
110
Featured
See All Featured
Making Projects Easy
brettharned
120
6.7k
Documentation Writing (for coders)
carmenintech
77
5.5k
Raft: Consensus for Rubyists
vanstee
141
7.7k
WENDY [Excerpt]
tessaabrams
13
39k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
Everyday Curiosity
cassininazir
0
320
The Pragmatic Product Professional
lauravandoore
37
7.4k
The Curse of the Amulet
leimatthew05
2
14k
Accessibility Awareness
sabderemane
1
210
Mind Mapping
helmedeiros
1
360
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
930
Building the Perfect Custom Keyboard
takai
2
870
Transcript
サーバへの接続を楽にして くれるツールを作ってみた Go(Un)Conference LT大会 6kg 2019/05/20
プロフィール sakoda kenji 迫田けんじ / webエンジニア • twitter.com/_sakoken • github.com/sakoken
株式会社アイスタイル テクノロジー本部 R&D部 週末バドミントンやってます。
話す内容 • 背景 • よくあるシーン • 欲しかったもの • デモ •
使ったライブラリー / ツール • やり残したこと • まとめ
背景
背景 自社ではまだdocker化やansible化が 進んでいないため、サーバに入って設 定をいじったりする作業が多い
よくあるシーン
よくあるシーン サーバにsshで入って仕事したい
よくあるシーン sakoken$ ssh
よくあるシーン sakoken$ ssh サーバのホスト名 なんだっけ
よくあるシーン sakoken$ ssh メモ帳 host: xxx.yyy.zzz password: abcd123456789
よくあるシーン sakoken$ ssh
[email protected]
よくあるシーン sakoken$ ssh
[email protected]
[email protected]
's password: パスワード なんだっけ
よくあるシーン sakoken$ ssh
[email protected]
[email protected]
's password: メモ帳 host: xxx.yyy.zzz password:
abcd123456789
このようなことあったりしませんか
欲しかったもの
欲しかったもの • ターミナル上で • hostの管理ができて • サーバのパスワードを覚えてなくても • sshでログインをしてくれるもの •
パスワードは暗号化されていて • 最近使ったものが分かり • 各hostにメモが書けて • hostの絞り込み検索ができること
作ってみました! https://github.com/sakoken/sshh
デモ https://github.com/sakoken/sshh
使ったライブラリ・ツールたち • github.com/chzyer/readline ◦ GNU-Readlineの様なライブラリで ◦ コマンドライン上でインタラクティブな機能を簡単に作れる • gopkg.in/urfave/cli.v2 ◦
コマンドラインツールを作るためのフレームワーク • github.com/goreleaser/goreleaser ◦ 各種OS用にビルドしたり ◦ brewでの配布を容易にしてくれたりする
github.com/chzyer/readline
github.com/chzyer/readline https://github.com/chzyer/readline/blob/master/example/readline-demo/readline-demo.go
github.com/chzyer/readline • readline.Readline ◦ 入力待ち • readline.ReadlineWithDefault ◦ デフォルト値入力済みの入力待ち •
readline.ReadPassword ◦ 入力値のマスキング
やり残したこと • 鍵認証への対応 • テスト
まとめ • インタラクティブなcliを作るのに chzyer/readlineがおすすめ • sshでHostやPassword覚えるのに疲れたら sakoken/sshhを使ってみてください
ご静聴ありがとうございます