Ok, I understood what's going on here! I had many ssh private keys and some of them have length <1024 but my main one is 2048. ssh-add doesn't add any key just because one of them is unsafe. I removed old keys and the problem is fixed.
I guess this is an upstream bug and not Ubuntu. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openssh in Ubuntu. https://bugs.launchpad.net/bugs/1764743 Title: ssh asks for passphrase Status in openssh package in Ubuntu: New Bug description: Every time I open gnome-terminal to connect to a remote host using ssh, it's asking me the passphrase of my ssh key. It was working fine on both my laptops (Ubuntu 16.04 and 17.10) and stopped working on both after the upgrade to 18.04. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: openssh-client 1:7.6p1-4 ProcVersionSignature: Ubuntu 4.15.0-15.16-generic 4.15.15 Uname: Linux 4.15.0-15-generic x86_64 ApportVersion: 2.20.9-0ubuntu5 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Tue Apr 17 09:30:03 2018 InstallationDate: Installed on 2018-01-09 (97 days ago) InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018) RelatedPackageVersions: ssh-askpass N/A libpam-ssh N/A keychain N/A ssh-askpass-gnome N/A SSHClientVersion: OpenSSH_7.6p1 Ubuntu-4, OpenSSL 1.0.2n 7 Dec 2017 SourcePackage: openssh UpgradeStatus: Upgraded to bionic on 2018-04-12 (4 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1764743/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp