ここ何か月かだと思うが、1号機にssh接続するとめちゃくちゃ時間がかかる

1号機はAMDのE350っていう、消費電力だけで導入した、いまじゃ箸にも棒にも

ひっかからないCPUだから仕方ないけど・・・と思ったが、それでも遅すぎる。
体感で5秒ぐらいかかる。

調べたら、GSSAPIAuthenticationを使用しているせいらしいので、Qiitaのこちらの記事
https://qiita.com/0x50/items/00cd0aa887d62143ddd5
を参考にしsshd.configを修正した。

このGSSAPIAuthenticationとは sso(single sign on)を利用する場合の機能らしく、宅内サーバでは不要なので、offでOKと判断した。

 

■修正手順

エディタで開く
vi /etc/ssh/sshd_config

GSSを検索する
/GSS

当該箇所の記載状況確認
# GSSAPI options
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no


赤字部分を追記して
# GSSAPI options
GSSAPIAuthentication no
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no

保存してエディタを終了
:wq

sshdを再起動
/etc/rc.d/init.d/sshd restart

 

※最近のだと  systemctl restart sshd  と書く

で問題なく接続でき、接続時間は一瞬になった。

めでたしめでたし。照れ