Hi,

   +-From: "Leis, Benjamin" <benl...@amazon.com> --
   |_Date: Wed, 11 May 2011 11:26:41 -0700 ________
   |
   |I'm trying to get a scenario working where  I SSH into a intermediary server
   | (via JSCH) and then SSH from there to a final destination. At the same time
   |I want this processing to occur in the background.  Everything works fine
   |until I added the nohup step. I added the -v option and compared the two 
   |runs with and without nohup and it appears that the agent forwarding breaks
   |down in this case:
   |My test command:
   |nohup ssh -v -f -A -p 22 -o StrictHostKeyChecking=no -o ConnectTimeout=30
   |-o UserKnownHostsFile=/dev/null -o ChallengeResponseAuthentication=no
   |-o PasswordAuthentication=no -o TCPKeepAlive=yes -o CheckHostIP=no
   |-o ServerAliveInterval=60 10.17.129.3 "bash -c \"touch foo; sleep 10s; 
touch foo2\""

Honestly to say, I may not understood the scenario correctly,
but this question is not related to jsch, isn't it?

The 'nohup' is an internal command on csh, tcsh, but it is an external
command (/usr/bin/nohup) on sh, bash, and it will fork a given command; ssh in 
that case.
In the agent-forwarding process, "ssh -A" command from OpenSSH will check 
the environment-variable "SSH_AUTH_SOCK", which points to unix-domain
socket connected to ssh-agent.
I guess that ssh command forked by nohup can not find that socket in that case.


Sincerely,
--
Atsuhiko Yamanaka
JCraft,Inc.
1-14-20 HONCHO AOBA-KU,
SENDAI, MIYAGI 980-0014 Japan.
Tel +81-22-723-2150
    +1-415-578-3454
Skype callto://jcraft/
Twitter: http://twitter.com/ymnk

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to