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
690
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
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
110
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
110
Kiro Crewをはじめよう
kizawa2020
1
120
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
170
go-sqletch
moznion
0
120
今こそ知りたいAmplifyGen2
mkdev10
2
160
あなたの知らないAmazon VPC Route Server/Amazon VPC Route Server you don't know about
masakiokuda
2
250
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
280
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.5k
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
510
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
150
Deep Data Security 機能解説
oracle4engineer
PRO
2
740
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
700
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Leo the Paperboy
mayatellez
10
2.4k
Typedesign – Prime Four
hannesfritz
42
3.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
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を使ってみてください
ご静聴ありがとうございます