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\""

Without nohup specified I see the following:  The pkalg key is being 
transferred as expected.

    [junit] line: debug1: Next authentication method: publickey
    [junit] line: debug1: Offering public key:
    [junit] line: debug1: Server accepts key: pkalg ssh-dss blen 433
    [junit] line: debug1: Authentication succeeded (publickey).

With nohup I see the following instead:

debug1: Next authentication method: publickey
debug1: Trying private key: /home/benleis/.ssh/identity
debug1: Trying private key: /home/benleis/.ssh/id_rsa
debug1: Trying private key: /home/benleis/.ssh/id_dsa
debug1: No more authentication methods to try.

Trying this out with ssh from the command line rather than JSCH I see the keys 
transfer as expected even when using nohup.
Does anyone know what might be going on?

Thanks

Ben



  __o       __o       __o       __o
_`\<,_    _`\<,_    _`\<,_    _`\<,_
(*)/ (*)  (*)/ (*)  (*)/ (*)  (*)/ (*)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to