Connecting to amazon lightsail ubuntu server using different ssh port

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








up vote
1
down vote

favorite
1












I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?










share|improve this question























  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
    – Arronical
    Mar 28 at 9:51










  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:07







  • 1




    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.
    – Arronical
    Mar 28 at 12:24







  • 1




    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:38














up vote
1
down vote

favorite
1












I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?










share|improve this question























  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
    – Arronical
    Mar 28 at 9:51










  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:07







  • 1




    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.
    – Arronical
    Mar 28 at 12:24







  • 1




    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:38












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?










share|improve this question















I have changed ssh port in lightsail server in /etc/ssh/sshd_config file to 2200, I have enabled firewall to accept connections on port 2200. But when I am trying to connect through my local machine using command,



ssh -i key.pem ubuntu@13.xxx.x.109 -p 2200


It is showing me an error "ssh: connect to host 13.xxx.x.109 port 2200: Connection refused". Can you help me out why it's connection is being refused?







ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 9:47









Arronical

12.6k84489




12.6k84489










asked Mar 28 at 8:51









Bhanu Sankhyan

61




61











  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
    – Arronical
    Mar 28 at 9:51










  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:07







  • 1




    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.
    – Arronical
    Mar 28 at 12:24







  • 1




    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:38
















  • Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
    – Arronical
    Mar 28 at 9:51










  • yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:07







  • 1




    Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.
    – Arronical
    Mar 28 at 12:24







  • 1




    yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
    – Bhanu Sankhyan
    Mar 28 at 12:38















Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
– Arronical
Mar 28 at 9:51




Has the key already been shared to the lightsail server, could you use it to login successfully on the default port? Also, do you need to use the absolute path to the key file?
– Arronical
Mar 28 at 9:51












yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
– Bhanu Sankhyan
Mar 28 at 12:07





yeah i was able to connect to lightsail server through port 22 using private key but when I changed port settings and enabled firewall settings on lightsail server its showing me the error shown above. Currently I am using ubuntu as local machine.
– Bhanu Sankhyan
Mar 28 at 12:07





1




1




Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.
– Arronical
Mar 28 at 12:24





Did you change the port that the ssh server is listening on and restart the ssh server? This is normally done in the /etc/ssh/sshd_config file on the server you're trying to ssh into.
– Arronical
Mar 28 at 12:24





1




1




yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
– Bhanu Sankhyan
Mar 28 at 12:38




yes I did changed the port to 2200 and i also checked with nmap, its showing "host is up" on 2200 port of lightsail ubntu server,that means 2200 port is open on server but it's not listening on port 2200 when i am connecting through ssh using my local machine.
– Bhanu Sankhyan
Mar 28 at 12:38










1 Answer
1






active

oldest

votes

















up vote
1
down vote













You need to turn on the port of the lightsail manage console.



Use Custom not SSH
Then change the ssh port to 2200






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%2f1019891%2fconnecting-to-amazon-lightsail-ubuntu-server-using-different-ssh-port%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













    You need to turn on the port of the lightsail manage console.



    Use Custom not SSH
    Then change the ssh port to 2200






    share|improve this answer
























      up vote
      1
      down vote













      You need to turn on the port of the lightsail manage console.



      Use Custom not SSH
      Then change the ssh port to 2200






      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        You need to turn on the port of the lightsail manage console.



        Use Custom not SSH
        Then change the ssh port to 2200






        share|improve this answer












        You need to turn on the port of the lightsail manage console.



        Use Custom not SSH
        Then change the ssh port to 2200







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 20 at 17:18









        Luis Torruella

        112




        112



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1019891%2fconnecting-to-amazon-lightsail-ubuntu-server-using-different-ssh-port%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491