How to check remote session enabled?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












If remote access session is enabled, I have to disable and later enable it. How to achieve this using Python code?.










share|improve this question



























    up vote
    0
    down vote

    favorite












    If remote access session is enabled, I have to disable and later enable it. How to achieve this using Python code?.










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      If remote access session is enabled, I have to disable and later enable it. How to achieve this using Python code?.










      share|improve this question















      If remote access session is enabled, I have to disable and later enable it. How to achieve this using Python code?.







      python remote-access






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 20 at 7:12









      Vishnu N K

      533518




      533518










      asked Feb 20 at 6:56









      Dinesh

      348




      348




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          I'm not completely sure what you mean by a remote access session.



          To see all listening services / ports run one of the following commands:



          sudo lsof -i -P -n | grep LISTEN
          sudo netstat -tulpn | grep LISTEN


          If you leave off the | grep LILSTEN part the same commands will also show active connections.



          sudo lsof -i -P -n
          sudo netstat -tulpn


          Typically VNC connections will use ports of 5900 or so.



          On my system I see:



          systemd 1 root 33u IPv4 17131 0t0 TCP *:111 (LISTEN)
          systemd 1 root 41u IPv6 17133 0t0 TCP *:111 (LISTEN)
          cupsd 2071 root 6u IPv6 43261 0t0 TCP [::1]:631 (LISTEN)
          cupsd 2071 root 7u IPv4 43262 0t0 TCP 127.0.0.1:631 (LISTEN)


          So I know everything on that list.



          I suppose it is possible for crackers to hide services, but that is a separate discussion.






          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007937%2fhow-to-check-remote-session-enabled%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            I'm not completely sure what you mean by a remote access session.



            To see all listening services / ports run one of the following commands:



            sudo lsof -i -P -n | grep LISTEN
            sudo netstat -tulpn | grep LISTEN


            If you leave off the | grep LILSTEN part the same commands will also show active connections.



            sudo lsof -i -P -n
            sudo netstat -tulpn


            Typically VNC connections will use ports of 5900 or so.



            On my system I see:



            systemd 1 root 33u IPv4 17131 0t0 TCP *:111 (LISTEN)
            systemd 1 root 41u IPv6 17133 0t0 TCP *:111 (LISTEN)
            cupsd 2071 root 6u IPv6 43261 0t0 TCP [::1]:631 (LISTEN)
            cupsd 2071 root 7u IPv4 43262 0t0 TCP 127.0.0.1:631 (LISTEN)


            So I know everything on that list.



            I suppose it is possible for crackers to hide services, but that is a separate discussion.






            share|improve this answer


























              up vote
              1
              down vote













              I'm not completely sure what you mean by a remote access session.



              To see all listening services / ports run one of the following commands:



              sudo lsof -i -P -n | grep LISTEN
              sudo netstat -tulpn | grep LISTEN


              If you leave off the | grep LILSTEN part the same commands will also show active connections.



              sudo lsof -i -P -n
              sudo netstat -tulpn


              Typically VNC connections will use ports of 5900 or so.



              On my system I see:



              systemd 1 root 33u IPv4 17131 0t0 TCP *:111 (LISTEN)
              systemd 1 root 41u IPv6 17133 0t0 TCP *:111 (LISTEN)
              cupsd 2071 root 6u IPv6 43261 0t0 TCP [::1]:631 (LISTEN)
              cupsd 2071 root 7u IPv4 43262 0t0 TCP 127.0.0.1:631 (LISTEN)


              So I know everything on that list.



              I suppose it is possible for crackers to hide services, but that is a separate discussion.






              share|improve this answer
























                up vote
                1
                down vote










                up vote
                1
                down vote









                I'm not completely sure what you mean by a remote access session.



                To see all listening services / ports run one of the following commands:



                sudo lsof -i -P -n | grep LISTEN
                sudo netstat -tulpn | grep LISTEN


                If you leave off the | grep LILSTEN part the same commands will also show active connections.



                sudo lsof -i -P -n
                sudo netstat -tulpn


                Typically VNC connections will use ports of 5900 or so.



                On my system I see:



                systemd 1 root 33u IPv4 17131 0t0 TCP *:111 (LISTEN)
                systemd 1 root 41u IPv6 17133 0t0 TCP *:111 (LISTEN)
                cupsd 2071 root 6u IPv6 43261 0t0 TCP [::1]:631 (LISTEN)
                cupsd 2071 root 7u IPv4 43262 0t0 TCP 127.0.0.1:631 (LISTEN)


                So I know everything on that list.



                I suppose it is possible for crackers to hide services, but that is a separate discussion.






                share|improve this answer














                I'm not completely sure what you mean by a remote access session.



                To see all listening services / ports run one of the following commands:



                sudo lsof -i -P -n | grep LISTEN
                sudo netstat -tulpn | grep LISTEN


                If you leave off the | grep LILSTEN part the same commands will also show active connections.



                sudo lsof -i -P -n
                sudo netstat -tulpn


                Typically VNC connections will use ports of 5900 or so.



                On my system I see:



                systemd 1 root 33u IPv4 17131 0t0 TCP *:111 (LISTEN)
                systemd 1 root 41u IPv6 17133 0t0 TCP *:111 (LISTEN)
                cupsd 2071 root 6u IPv6 43261 0t0 TCP [::1]:631 (LISTEN)
                cupsd 2071 root 7u IPv4 43262 0t0 TCP 127.0.0.1:631 (LISTEN)


                So I know everything on that list.



                I suppose it is possible for crackers to hide services, but that is a separate discussion.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 22 at 7:52









                galoget

                2,1062820




                2,1062820










                answered Feb 20 at 7:31









                Panther

                75.3k10150257




                75.3k10150257



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007937%2fhow-to-check-remote-session-enabled%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Which professions warranted travel in Medieval times?

                    How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                    Trouble downloading packages list due to a “Hash sum mismatch” error