I am trying to do some ssh based git clone. While at it, I ran into a ssh command syntax some of which I don't understand:

ssh -i $pwd/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "\$@"

What is this "\$@"?



$@ means all the parameters passed to the script, but this may be interpretted too early.

For passing it originally to ssh params, you need to escape it, and the simplest way is to escape the $ sign, which results in "\$@".

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.