0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ubuntu 16.04 (xenial) で sshd が org.freedesktop.login1 の time out まで応答しない場合の対処

Last updated at Posted at 2018-10-01

この記事で見付けた,#81のコメント.
#770135 - systemd: ssh logins considerably delayed (until PAM timeout) when systemd is upgraded but the system not rebooted - Debian Bug report logs

環境は他人に作ってもらったので,よく把握してないけど,LDAPで認証している鯖(下のログのhostname)に192.168.1.2からログインしているシチュエーション.
困ってたのが,こんなログで,3行目が出るまでの,大体30秒くらい待たされる.
ちなみに,公開鍵認証ではなくパスワード認証でも同じ症状.

Oct  1 17:57:46 hostname sshd[2177]: Accepted publickey for username from 192.168.1.2 port 52340 ssh2: ED25519 SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Oct  1 17:57:46 hostname sshd[2177]: pam_unix(sshd:session): session opened for user username by (uid=0)
Oct  1 17:58:12 hostname sshd[2177]: pam_systemd(sshd:session): Failed to create session: Failed to activate service 'org.freedesktop.login1': timed out

で,pam_systemd.so をコメントアウトするだけで直った.

/etc/pam.d/common-session
--- /etc/pam.d/common-session.org
+++ /etc/pam.d/common-session
@@ -31 +31 @@
-session	optional	pam_systemd.so 
+#session	optional	pam_systemd.so 

今のログはこんな感じ.
パスワード認証でも同じく解消する.

Oct  1 18:09:39 hostname sshd[2808]: Accepted publickey for username from 192.168.1.2 port 52522 ssh2: ED25519 SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Oct  1 18:09:39 hostname sshd[2808]: pam_unix(sshd:session): session opened for user username by (uid=0)

む…認証通っててもpam_systemdを見に行ってたのか.

sshを通す以外のことをしてないので,他に問題が生じているかは分からない.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?