- Package:
- openssh-client
- Source:
- openssh
- Description:
- secure shell (SSH) client, for secure access to remote machines
- Submitter:
- Harald Dunkel
- Date:
- 2015-10-08 07:18:10 UTC
- Severity:
- normal
I start 2 vnc sessions at boot time using cron, e.g. % crontab -l @reboot ssh-agent vncserver :42 @reboot sleep 3; ssh-agent vncserver :43 UID != 0 Problem: The first ssh-agent gets killed. Suspect is the second agent. The first vnc session has no connection to an ssh-agent. Besides that, both are fine. SSH_AGENT_PID and SSH_AUTH_SOCK are defined in both sessions, but of course they do not match. If I login on the console, then libpam-ssh gives me yet another new ssh-agent, and the 2nd vncserver agent is pushing up the daisies, too. The man page doesn't say "only one ssh-agent per user". From my understanding they should not interfere with each other. Esp. SSH_AUTH_SOCK is based on the agent's PID to make sure that several agents can run in parallel. Further the agents should not die while their children are still running. Regards Harri
2015-10-07 09:30:12 Harald Dunkel: Please do an strace on the ssh-agent to find out why it dies: @reboot strace -ttTffo st ssh-agent vncserver :42 @reboot sleep 3; strace -ttTffo st ssh-agent vncserver :43 Keep the sessions short or the output files get really large; perhaps you can just wait until the process dies and then kill all of the remaining processes. Grüße Timo
Attached. Seems my observation was not correct: Both ssh-agents die after some time, independent from each other. Apparently ssh-agent doesn't manage a process group, but just a single child. If it exits, then ssh-agent terminates, too, ignoring the grand children (started by the vncserver wrapper script, for example). Regards Harri