How to maintain ssh-agent login session with Windows 10's new OpenSSH and PowerShell ...

If A makes B more likely then B makes A more likely"

Why is there no army of Iron-Mans in the MCU?

Mortgage adviser recommends a longer term than necessary combined with overpayments

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

How can players take actions together that are impossible otherwise?

Replacing HDD with SSD; what about non-APFS/APFS?

What do you call the holes in a flute?

Do we know why communications with Beresheet and NASA were lost during the attempted landing of the Moon lander?

New Order #5: where Fibonacci and Beatty meet at Wythoff

What are the performance impacts of 'functional' Rust?

Working around an AWS network ACL rule limit

What LEGO pieces have "real-world" functionality?

Stars Make Stars

What can I do if my MacBook isn’t charging but already ran out?

How to say that you spent the night with someone, you were only sleeping and nothing else?

Why is "Captain Marvel" translated as male in Portugal?

When is phishing education going too far?

Blender game recording at the wrong time

Geometric mean and geometric standard deviation

What did Darwin mean by 'squib' here?

What's the difference between (size_t)-1 and ~0?

Strange behaviour of Check

If I can make up priors, why can't I make up posteriors?

Can the prologue be the backstory of your main character?



How to maintain ssh-agent login session with Windows 10's new OpenSSH and PowerShell



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)ssh-agent and ssh-addIs there an equivalent to ssh-copy-id with OpenSSH in Powershell?Connecting SSH with OpenSSH keyssh session timeout using openssh clientSSH connection to Windows closed automatically using OpenSSH for WindowsHow to run PowerShell inside an SSH session (with Win32-OpenSSH on Windows 10)?OpenSSH Server for Windows 10 - Could not enter anything in Ubuntu terminal launched from cmd / powershell SSH sessionSmartcard OpenSSH and PuTTY SSHSSH & Windows 10: Connection Works With Powershell and Git Bash But Not With Other ToolsDifference Between Windows Native OpenSSH and openssh-portable(Win32-OpenSSH)





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







11















On my Ubuntu machine, I simply use Keychain to maintain a single ssh-agent which stays logged in.



I'd like something similar to that on Windows now that OpenSSH is natively included. I was using Git Bash with the well-known if [ -z "$SSH_AUTH_SOCK" ] ; then ... script but this resulted in many ssh agents being opened, I knew it was advised against (partly due to this blog post: http://rabexc.org/posts/pitfalls-of-ssh-agents) - which is what made me get Keychain for Ubuntu. Another reason for not using this any more is that I'm moving to PowerShell as my main shell.



But I'm not sure how to achieve the same kind of thing on Windows specifically with PowerShell and with Win32-OpenSSH.



Thanks!










share|improve this question





























    11















    On my Ubuntu machine, I simply use Keychain to maintain a single ssh-agent which stays logged in.



    I'd like something similar to that on Windows now that OpenSSH is natively included. I was using Git Bash with the well-known if [ -z "$SSH_AUTH_SOCK" ] ; then ... script but this resulted in many ssh agents being opened, I knew it was advised against (partly due to this blog post: http://rabexc.org/posts/pitfalls-of-ssh-agents) - which is what made me get Keychain for Ubuntu. Another reason for not using this any more is that I'm moving to PowerShell as my main shell.



    But I'm not sure how to achieve the same kind of thing on Windows specifically with PowerShell and with Win32-OpenSSH.



    Thanks!










    share|improve this question

























      11












      11








      11


      3






      On my Ubuntu machine, I simply use Keychain to maintain a single ssh-agent which stays logged in.



      I'd like something similar to that on Windows now that OpenSSH is natively included. I was using Git Bash with the well-known if [ -z "$SSH_AUTH_SOCK" ] ; then ... script but this resulted in many ssh agents being opened, I knew it was advised against (partly due to this blog post: http://rabexc.org/posts/pitfalls-of-ssh-agents) - which is what made me get Keychain for Ubuntu. Another reason for not using this any more is that I'm moving to PowerShell as my main shell.



      But I'm not sure how to achieve the same kind of thing on Windows specifically with PowerShell and with Win32-OpenSSH.



      Thanks!










      share|improve this question














      On my Ubuntu machine, I simply use Keychain to maintain a single ssh-agent which stays logged in.



      I'd like something similar to that on Windows now that OpenSSH is natively included. I was using Git Bash with the well-known if [ -z "$SSH_AUTH_SOCK" ] ; then ... script but this resulted in many ssh agents being opened, I knew it was advised against (partly due to this blog post: http://rabexc.org/posts/pitfalls-of-ssh-agents) - which is what made me get Keychain for Ubuntu. Another reason for not using this any more is that I'm moving to PowerShell as my main shell.



      But I'm not sure how to achieve the same kind of thing on Windows specifically with PowerShell and with Win32-OpenSSH.



      Thanks!







      windows-10 ssh powershell openssh windows-10-v1803






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 31 '18 at 22:11









      SouthclawsSouthclaws

      5816




      5816






















          2 Answers
          2






          active

          oldest

          votes


















          4














          You must configure OpenSSH Authentication Agent service to automatically start (or you can start it manually everytime when opening your powershell for the first time: Start-Service ssh-agent).



          After that, you need to ssh-add C:pathtoyoursshkeyid_rsa only once. After that, everytime the ssh-agent is started, the key will be there. You can check with `ssh-add -l´.






          share|improve this answer

































            0














            I initially want to suggest ssh-pageant tools, but after browsing ssh-pageant site, it looks like there is a variant of ssh-pageant called weasel-pageant



            Please take a look at the tool at https://github.com/vuori/weasel-pageant






            share|improve this answer



















            • 1





              The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

              – foxX
              Mar 13 at 14:44












            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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/3.0/"u003ecc by-sa 3.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%2fsuperuser.com%2fquestions%2f1327633%2fhow-to-maintain-ssh-agent-login-session-with-windows-10s-new-openssh-and-powers%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            You must configure OpenSSH Authentication Agent service to automatically start (or you can start it manually everytime when opening your powershell for the first time: Start-Service ssh-agent).



            After that, you need to ssh-add C:pathtoyoursshkeyid_rsa only once. After that, everytime the ssh-agent is started, the key will be there. You can check with `ssh-add -l´.






            share|improve this answer






























              4














              You must configure OpenSSH Authentication Agent service to automatically start (or you can start it manually everytime when opening your powershell for the first time: Start-Service ssh-agent).



              After that, you need to ssh-add C:pathtoyoursshkeyid_rsa only once. After that, everytime the ssh-agent is started, the key will be there. You can check with `ssh-add -l´.






              share|improve this answer




























                4












                4








                4







                You must configure OpenSSH Authentication Agent service to automatically start (or you can start it manually everytime when opening your powershell for the first time: Start-Service ssh-agent).



                After that, you need to ssh-add C:pathtoyoursshkeyid_rsa only once. After that, everytime the ssh-agent is started, the key will be there. You can check with `ssh-add -l´.






                share|improve this answer















                You must configure OpenSSH Authentication Agent service to automatically start (or you can start it manually everytime when opening your powershell for the first time: Start-Service ssh-agent).



                After that, you need to ssh-add C:pathtoyoursshkeyid_rsa only once. After that, everytime the ssh-agent is started, the key will be there. You can check with `ssh-add -l´.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited yesterday









                David Warnke

                32




                32










                answered Aug 31 '18 at 12:49









                Davi Koscianski VidalDavi Koscianski Vidal

                413




                413

























                    0














                    I initially want to suggest ssh-pageant tools, but after browsing ssh-pageant site, it looks like there is a variant of ssh-pageant called weasel-pageant



                    Please take a look at the tool at https://github.com/vuori/weasel-pageant






                    share|improve this answer



















                    • 1





                      The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

                      – foxX
                      Mar 13 at 14:44
















                    0














                    I initially want to suggest ssh-pageant tools, but after browsing ssh-pageant site, it looks like there is a variant of ssh-pageant called weasel-pageant



                    Please take a look at the tool at https://github.com/vuori/weasel-pageant






                    share|improve this answer



















                    • 1





                      The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

                      – foxX
                      Mar 13 at 14:44














                    0












                    0








                    0







                    I initially want to suggest ssh-pageant tools, but after browsing ssh-pageant site, it looks like there is a variant of ssh-pageant called weasel-pageant



                    Please take a look at the tool at https://github.com/vuori/weasel-pageant






                    share|improve this answer













                    I initially want to suggest ssh-pageant tools, but after browsing ssh-pageant site, it looks like there is a variant of ssh-pageant called weasel-pageant



                    Please take a look at the tool at https://github.com/vuori/weasel-pageant







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 15 '18 at 7:03









                    Sharuzzaman Ahmat RaslanSharuzzaman Ahmat Raslan

                    1955




                    1955








                    • 1





                      The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

                      – foxX
                      Mar 13 at 14:44














                    • 1





                      The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

                      – foxX
                      Mar 13 at 14:44








                    1




                    1





                    The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

                    – foxX
                    Mar 13 at 14:44





                    The thing is we're moving away from custom tools (PuTTY) and towards standard tools (OpenSSH), so this is unrelated to the OpenSSH question at hand, since OpenSSH is significantly more supported than custom tools.

                    – foxX
                    Mar 13 at 14:44


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f1327633%2fhow-to-maintain-ssh-agent-login-session-with-windows-10s-new-openssh-and-powers%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

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Tribunal Administrativo e Fiscal de Mirandela Referências Menu de...

                    looking for continuous Screen Capture for retroactivly reproducing errors, timeback machineRolling desktop...