I'm trying to set up ssh-add/ssh-askpass so that it asks me for my ssh key passwords when I first login to my desktop environment.  I've added a .xsession file to my home directory which contains the following:ssh-add ~/.ssh/my_keyRight after I first login using my username/password a dialog pops up asking me to enter the password for the key I specified; however, after I enter the password, I'm always returned back to the login screen and I can't login.  I had this same problem before and I solved it somehow, unfortunately, I didn't take any notes on what I did and I also can't seem to find the solution online anywhere.  Any ideas?  I'm using Debian 8 with LXDE and lightdm.
Returned to login screen when using ssh-askpass during login
ssh;ssh agent
The .xsession script runs your entire session. When the script stops running, that's the end, and you're logged back out. If it only contains one command, that's the whole session.It should at least start your window manager:exec startlxdeYou may want to run several background commands and then the single exec line, which becomes the session at that point. Nothing after that line will run.I imagine that LXDE has some sort of autostart functionality you could use instead of .xsession. pam_ssh is made for exactly what you're doing, as well.