I have a machine recently updated to Fedora 25, running openSSH 7.4. Ever since then, logging in via ssh takes 25-30 seconds on a LAN where it normally takes no more than 1 second.
Running the client with
-vvv, using public key authentication, the pause occurs here.
debug1: Authentication succeeded (publickey).
Authenticated to crystalline.kodiak ([192.168.0.22]:127).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting email@example.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
This looks identical to output to other (Fedora 23, openSSH 7.2) machines on the same network which do not have any problem.
Watching top on the server side during the login,
systemd flares up briefly -- a few seconds -- at the beginning of the pause, something not noticeable on the other machines. After that the system is completely idle. Likewise, there is no unusual activity on the client side.
Once logged in everything is fine.
I have watched the exchange from the client with Wireshark and during the pause there are no packets exchanged. The client and server are on Ethernet through a Router, so I am also able to watch the server address for any traffic. There's nothing going on.
AcceptEnv LANG LC_*
Subsystem sftp /usr/libexec/openssh/sftp-server
As per Sato Katsura's suggestion in comments, I have tried with
UseDNS no; this did not make any difference.