Cannot cat .pem file inline as -i option to sshWhat is the right file permission for a .pem file to SSH and...

How to convert what I'm singing to notes

[Cannot read property 'setParams' of null]

Windows 10 deletes lots of tiny files super slowly. Anything that can be done to speed it up?

Can I build a half bath without permits?

split 1 column input into 5 column bed file

After viewing logs with journalctl, how do I exit the screen that says "lines 1-2/2 (END)"?

Why is STARTTLS still used?

How can I model regression with an asymmetric loss function?

Concerning a relationship in the team

How deep is the liquid in a half-full hemisphere?

How do we know neutrons have no charge?

An impressive body of work

Dynamic DataSource for Droplist in Content Editor

Read-once memory

Why aren't faces sharp in my f/1.8 portraits even though I'm carefully using center-point autofocus?

How to stop the death waves in my city?

If a spaceship ran out of fuel somewhere in space between Earth and Mars, does it slowly drift off to the Sun?

"I will not" or "I don't" as an answer for negative orders?

A famous scholar sent me an unpublished draft of hers. Then she died. I think her work should be published. What should I do?

Where to find the Arxiv endorsement code?

Is there no "respectively" in german language when listing (enumerating) something?

What happens to a net with the Returning Weapon artificer infusion after it hits?

How do my husband and I get over our fear of having another difficult baby?

Why, even after his imprisonment, people keep calling Hannibal Lecter "Doctor"?



Cannot cat .pem file inline as -i option to ssh


What is the right file permission for a .pem file to SSH and SCPWhat happens when I cat a non-text file?copy file with cat in execl() finctioncat [file..] pipe another cat commandHow does cat > file << “END” work?Cat file dealing with header?Why does the cat command only read from the first file descriptor?cat is stuck on a specific file






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I am getting this error:




Warning: Identity file /dev/fd/63 not accessible: Bad file descriptor.




when running this command:



ssh -Y 'root@ec2-54-xxx-94-xxx.us-west-2.compute.amazonaws.com' -i <(cat << EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAgbUQXIfIWtMJpYcTn5C+LStaL8NICo/0l1V33IQ8pQADUk+Tq+cfotyiHrRl
JXRyn8KJe8zmAQs7uSR3drVdj2KNFhXnFsEbXYxjAS93ZutO1Z2eBvvKcp/W8AoOr7r2JtTXaGml
W18/0Fot83UcVRdqYI4CCv5hhYN7oGDYT94d8d0yFtuIhXf8IlkCgYEAkugROAktxuG1AgQ9KGP5
.........
a3ZAHHf5F2rn0oW0X5YNtEWqhGknYQkkiztqaWAPM4bAP7gpDIqYyqh81soqYHxxP9q2Ch634NPb
BMmdZb9hMb/PY9bJNKwZt/yO7W0yq1zzjXFIqhymGDqkc/E4/K+V+svsDIV8VtainrY=
-----END RSA PRIVATE KEY-----
EOF
)
nix-collect-garbage


I am just trying to run the 'nix-collect-garbage' command on the remote machine.



Perhaps the temporary file/fd has the wrong permissions? Is there a way to give i the right permissions?



I assume it's a permissions problem with the process substitution but not sure how to resolve it.










share|improve this question

























  • The /dev/fd/63 of a proc subst is not a temporary file, but a pipe (either anonymous or named).

    – mosvy
    16 mins ago


















0















I am getting this error:




Warning: Identity file /dev/fd/63 not accessible: Bad file descriptor.




when running this command:



ssh -Y 'root@ec2-54-xxx-94-xxx.us-west-2.compute.amazonaws.com' -i <(cat << EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAgbUQXIfIWtMJpYcTn5C+LStaL8NICo/0l1V33IQ8pQADUk+Tq+cfotyiHrRl
JXRyn8KJe8zmAQs7uSR3drVdj2KNFhXnFsEbXYxjAS93ZutO1Z2eBvvKcp/W8AoOr7r2JtTXaGml
W18/0Fot83UcVRdqYI4CCv5hhYN7oGDYT94d8d0yFtuIhXf8IlkCgYEAkugROAktxuG1AgQ9KGP5
.........
a3ZAHHf5F2rn0oW0X5YNtEWqhGknYQkkiztqaWAPM4bAP7gpDIqYyqh81soqYHxxP9q2Ch634NPb
BMmdZb9hMb/PY9bJNKwZt/yO7W0yq1zzjXFIqhymGDqkc/E4/K+V+svsDIV8VtainrY=
-----END RSA PRIVATE KEY-----
EOF
)
nix-collect-garbage


I am just trying to run the 'nix-collect-garbage' command on the remote machine.



Perhaps the temporary file/fd has the wrong permissions? Is there a way to give i the right permissions?



I assume it's a permissions problem with the process substitution but not sure how to resolve it.










share|improve this question

























  • The /dev/fd/63 of a proc subst is not a temporary file, but a pipe (either anonymous or named).

    – mosvy
    16 mins ago














0












0








0








I am getting this error:




Warning: Identity file /dev/fd/63 not accessible: Bad file descriptor.




when running this command:



ssh -Y 'root@ec2-54-xxx-94-xxx.us-west-2.compute.amazonaws.com' -i <(cat << EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAgbUQXIfIWtMJpYcTn5C+LStaL8NICo/0l1V33IQ8pQADUk+Tq+cfotyiHrRl
JXRyn8KJe8zmAQs7uSR3drVdj2KNFhXnFsEbXYxjAS93ZutO1Z2eBvvKcp/W8AoOr7r2JtTXaGml
W18/0Fot83UcVRdqYI4CCv5hhYN7oGDYT94d8d0yFtuIhXf8IlkCgYEAkugROAktxuG1AgQ9KGP5
.........
a3ZAHHf5F2rn0oW0X5YNtEWqhGknYQkkiztqaWAPM4bAP7gpDIqYyqh81soqYHxxP9q2Ch634NPb
BMmdZb9hMb/PY9bJNKwZt/yO7W0yq1zzjXFIqhymGDqkc/E4/K+V+svsDIV8VtainrY=
-----END RSA PRIVATE KEY-----
EOF
)
nix-collect-garbage


I am just trying to run the 'nix-collect-garbage' command on the remote machine.



Perhaps the temporary file/fd has the wrong permissions? Is there a way to give i the right permissions?



I assume it's a permissions problem with the process substitution but not sure how to resolve it.










share|improve this question














I am getting this error:




Warning: Identity file /dev/fd/63 not accessible: Bad file descriptor.




when running this command:



ssh -Y 'root@ec2-54-xxx-94-xxx.us-west-2.compute.amazonaws.com' -i <(cat << EOF
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAgbUQXIfIWtMJpYcTn5C+LStaL8NICo/0l1V33IQ8pQADUk+Tq+cfotyiHrRl
JXRyn8KJe8zmAQs7uSR3drVdj2KNFhXnFsEbXYxjAS93ZutO1Z2eBvvKcp/W8AoOr7r2JtTXaGml
W18/0Fot83UcVRdqYI4CCv5hhYN7oGDYT94d8d0yFtuIhXf8IlkCgYEAkugROAktxuG1AgQ9KGP5
.........
a3ZAHHf5F2rn0oW0X5YNtEWqhGknYQkkiztqaWAPM4bAP7gpDIqYyqh81soqYHxxP9q2Ch634NPb
BMmdZb9hMb/PY9bJNKwZt/yO7W0yq1zzjXFIqhymGDqkc/E4/K+V+svsDIV8VtainrY=
-----END RSA PRIVATE KEY-----
EOF
)
nix-collect-garbage


I am just trying to run the 'nix-collect-garbage' command on the remote machine.



Perhaps the temporary file/fd has the wrong permissions? Is there a way to give i the right permissions?



I assume it's a permissions problem with the process substitution but not sure how to resolve it.







shell permissions cat file-descriptors nixos






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Alexander MillsAlexander Mills

2,6462 gold badges24 silver badges75 bronze badges




2,6462 gold badges24 silver badges75 bronze badges
















  • The /dev/fd/63 of a proc subst is not a temporary file, but a pipe (either anonymous or named).

    – mosvy
    16 mins ago



















  • The /dev/fd/63 of a proc subst is not a temporary file, but a pipe (either anonymous or named).

    – mosvy
    16 mins ago

















The /dev/fd/63 of a proc subst is not a temporary file, but a pipe (either anonymous or named).

– mosvy
16 mins ago





The /dev/fd/63 of a proc subst is not a temporary file, but a pipe (either anonymous or named).

– mosvy
16 mins ago










1 Answer
1






active

oldest

votes


















1
















ssh will close all its file descriptors, except for the standard in, out and err, before doing anything interesting, even before parsing its command line switches.



So you cannot use process substitutions (or any shell features which are using the /dev/fd/ mechanism) to pass file arguments to -i or other options.






share|improve this answer






























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });















    draft saved

    draft discarded
















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f543336%2fcannot-cat-pem-file-inline-as-i-option-to-ssh%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1
















    ssh will close all its file descriptors, except for the standard in, out and err, before doing anything interesting, even before parsing its command line switches.



    So you cannot use process substitutions (or any shell features which are using the /dev/fd/ mechanism) to pass file arguments to -i or other options.






    share|improve this answer
































      1
















      ssh will close all its file descriptors, except for the standard in, out and err, before doing anything interesting, even before parsing its command line switches.



      So you cannot use process substitutions (or any shell features which are using the /dev/fd/ mechanism) to pass file arguments to -i or other options.






      share|improve this answer






























        1














        1










        1









        ssh will close all its file descriptors, except for the standard in, out and err, before doing anything interesting, even before parsing its command line switches.



        So you cannot use process substitutions (or any shell features which are using the /dev/fd/ mechanism) to pass file arguments to -i or other options.






        share|improve this answer















        ssh will close all its file descriptors, except for the standard in, out and err, before doing anything interesting, even before parsing its command line switches.



        So you cannot use process substitutions (or any shell features which are using the /dev/fd/ mechanism) to pass file arguments to -i or other options.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 19 mins ago

























        answered 35 mins ago









        mosvymosvy

        17.5k2 gold badges24 silver badges55 bronze badges




        17.5k2 gold badges24 silver badges55 bronze badges


































            draft saved

            draft discarded



















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f543336%2fcannot-cat-pem-file-inline-as-i-option-to-ssh%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

            The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

            Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...