Skip to content
Update ssh authored by umaumax's avatar umaumax
...@@ -339,6 +339,15 @@ dotfilesに`pack`コマンドを作成した ...@@ -339,6 +339,15 @@ dotfilesに`pack`コマンドを作成した
e.g. `ssh-keygen -t ecdsa -b 521` e.g. `ssh-keygen -t ecdsa -b 521`
## 💡圧縮
* [ssh(1) manページ]( https://nxmnpg.lemoda.net/ja/1/ssh )
* [ssh_config(5) manページ]( https://nxmnpg.lemoda.net/ja/5/ssh_config )
* デフォルトで圧縮はOFFである
* `ssh -C``ssh -OCompression`のどちらかを指定すればよい(`gzip`とおなじ`6`(速い/低圧縮率 `1` - `9` 遅い/高圧縮率)であり、プロトコルバージョン`1`のみ変更可能であるので、事実上変更不可である)
* e.g. 100MB/s程度のリモートフォワーディングの場合はおおよそ`sshd`のCPU利用率が50%ほどであった
* AWSからの通信の場合は適用した方が、スループット・レイテンシーともに増えた
## tips ## tips
### [while内でsshを使うと1回で止まる \- Miuran Business Systems]( http://site.m-bsys.com/error/whileread-ssh ) ### [while内でsshを使うと1回で止まる \- Miuran Business Systems]( http://site.m-bsys.com/error/whileread-ssh )
use `ssh -n` for avoid staling `stdin` (`-n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background.`) use `ssh -n` for avoid staling `stdin` (`-n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background.`)
... ...
......