How to connect to a certain port on SSH [duplicate]












1
















This question already has an answer here:




  • Login with SSH authorized key with changed SSH port

    2 answers




So, I am setting up an ssh server. I have installed the ssh-server program on my server. However, I didn't want to connect to it through port 22, because reasons, so I set the server to listen through another port (2584). How do i set up my client to also connect through port 2584 rather than port 22?










share|improve this question













marked as duplicate by karel, Sergiy Kolodyazhnyy, pa4080, Zanna, Kulfy Jan 23 at 11:08


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 2





    You can setup ~/.ssh/config file to simplify your ssh terminal commands, here is a complete manual: How To Configure Custom Connection Options for your SSH Client. Also in this answer of mine is presented an example.

    – pa4080
    Jan 16 at 16:39


















1
















This question already has an answer here:




  • Login with SSH authorized key with changed SSH port

    2 answers




So, I am setting up an ssh server. I have installed the ssh-server program on my server. However, I didn't want to connect to it through port 22, because reasons, so I set the server to listen through another port (2584). How do i set up my client to also connect through port 2584 rather than port 22?










share|improve this question













marked as duplicate by karel, Sergiy Kolodyazhnyy, pa4080, Zanna, Kulfy Jan 23 at 11:08


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • 2





    You can setup ~/.ssh/config file to simplify your ssh terminal commands, here is a complete manual: How To Configure Custom Connection Options for your SSH Client. Also in this answer of mine is presented an example.

    – pa4080
    Jan 16 at 16:39
















1












1








1









This question already has an answer here:




  • Login with SSH authorized key with changed SSH port

    2 answers




So, I am setting up an ssh server. I have installed the ssh-server program on my server. However, I didn't want to connect to it through port 22, because reasons, so I set the server to listen through another port (2584). How do i set up my client to also connect through port 2584 rather than port 22?










share|improve this question















This question already has an answer here:




  • Login with SSH authorized key with changed SSH port

    2 answers




So, I am setting up an ssh server. I have installed the ssh-server program on my server. However, I didn't want to connect to it through port 22, because reasons, so I set the server to listen through another port (2584). How do i set up my client to also connect through port 2584 rather than port 22?





This question already has an answer here:




  • Login with SSH authorized key with changed SSH port

    2 answers








server ssh ip port-forwarding client






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 16 at 16:23









Saker AlabasSaker Alabas

82




82




marked as duplicate by karel, Sergiy Kolodyazhnyy, pa4080, Zanna, Kulfy Jan 23 at 11:08


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by karel, Sergiy Kolodyazhnyy, pa4080, Zanna, Kulfy Jan 23 at 11:08


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 2





    You can setup ~/.ssh/config file to simplify your ssh terminal commands, here is a complete manual: How To Configure Custom Connection Options for your SSH Client. Also in this answer of mine is presented an example.

    – pa4080
    Jan 16 at 16:39
















  • 2





    You can setup ~/.ssh/config file to simplify your ssh terminal commands, here is a complete manual: How To Configure Custom Connection Options for your SSH Client. Also in this answer of mine is presented an example.

    – pa4080
    Jan 16 at 16:39










2




2





You can setup ~/.ssh/config file to simplify your ssh terminal commands, here is a complete manual: How To Configure Custom Connection Options for your SSH Client. Also in this answer of mine is presented an example.

– pa4080
Jan 16 at 16:39







You can setup ~/.ssh/config file to simplify your ssh terminal commands, here is a complete manual: How To Configure Custom Connection Options for your SSH Client. Also in this answer of mine is presented an example.

– pa4080
Jan 16 at 16:39












2 Answers
2






active

oldest

votes


















3














Assuming you are using normal ssh command it is the additional parameter -p (see the man page of man ssh). E.g:



$ ssh -p 2584 user@host





share|improve this answer



















  • 1





    Thanks so much! This worked! Now I dont have to use teamviewer...

    – Saker Alabas
    Jan 16 at 16:31











  • I can't, I am a new user, and my upvotes are not displayed.

    – Saker Alabas
    Jan 17 at 1:45



















0














Note that ssh accepts commands in the URI form, such as ssh://user@host.com:<port>. It is perfectly valid to do the following:



ssh  ssh://myuser@domain_name.com:2222


Alternatively, to avoid specifying port each time, you can declare it within ~/.ssh/config. See steeldriver's answer for details.






share|improve this answer






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Assuming you are using normal ssh command it is the additional parameter -p (see the man page of man ssh). E.g:



    $ ssh -p 2584 user@host





    share|improve this answer



















    • 1





      Thanks so much! This worked! Now I dont have to use teamviewer...

      – Saker Alabas
      Jan 16 at 16:31











    • I can't, I am a new user, and my upvotes are not displayed.

      – Saker Alabas
      Jan 17 at 1:45
















    3














    Assuming you are using normal ssh command it is the additional parameter -p (see the man page of man ssh). E.g:



    $ ssh -p 2584 user@host





    share|improve this answer



















    • 1





      Thanks so much! This worked! Now I dont have to use teamviewer...

      – Saker Alabas
      Jan 16 at 16:31











    • I can't, I am a new user, and my upvotes are not displayed.

      – Saker Alabas
      Jan 17 at 1:45














    3












    3








    3







    Assuming you are using normal ssh command it is the additional parameter -p (see the man page of man ssh). E.g:



    $ ssh -p 2584 user@host





    share|improve this answer













    Assuming you are using normal ssh command it is the additional parameter -p (see the man page of man ssh). E.g:



    $ ssh -p 2584 user@host






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 16 at 16:27









    Christian WolfChristian Wolf

    20018




    20018








    • 1





      Thanks so much! This worked! Now I dont have to use teamviewer...

      – Saker Alabas
      Jan 16 at 16:31











    • I can't, I am a new user, and my upvotes are not displayed.

      – Saker Alabas
      Jan 17 at 1:45














    • 1





      Thanks so much! This worked! Now I dont have to use teamviewer...

      – Saker Alabas
      Jan 16 at 16:31











    • I can't, I am a new user, and my upvotes are not displayed.

      – Saker Alabas
      Jan 17 at 1:45








    1




    1





    Thanks so much! This worked! Now I dont have to use teamviewer...

    – Saker Alabas
    Jan 16 at 16:31





    Thanks so much! This worked! Now I dont have to use teamviewer...

    – Saker Alabas
    Jan 16 at 16:31













    I can't, I am a new user, and my upvotes are not displayed.

    – Saker Alabas
    Jan 17 at 1:45





    I can't, I am a new user, and my upvotes are not displayed.

    – Saker Alabas
    Jan 17 at 1:45













    0














    Note that ssh accepts commands in the URI form, such as ssh://user@host.com:<port>. It is perfectly valid to do the following:



    ssh  ssh://myuser@domain_name.com:2222


    Alternatively, to avoid specifying port each time, you can declare it within ~/.ssh/config. See steeldriver's answer for details.






    share|improve this answer




























      0














      Note that ssh accepts commands in the URI form, such as ssh://user@host.com:<port>. It is perfectly valid to do the following:



      ssh  ssh://myuser@domain_name.com:2222


      Alternatively, to avoid specifying port each time, you can declare it within ~/.ssh/config. See steeldriver's answer for details.






      share|improve this answer


























        0












        0








        0







        Note that ssh accepts commands in the URI form, such as ssh://user@host.com:<port>. It is perfectly valid to do the following:



        ssh  ssh://myuser@domain_name.com:2222


        Alternatively, to avoid specifying port each time, you can declare it within ~/.ssh/config. See steeldriver's answer for details.






        share|improve this answer













        Note that ssh accepts commands in the URI form, such as ssh://user@host.com:<port>. It is perfectly valid to do the following:



        ssh  ssh://myuser@domain_name.com:2222


        Alternatively, to avoid specifying port each time, you can declare it within ~/.ssh/config. See steeldriver's answer for details.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 23 at 1:32









        Sergiy KolodyazhnyySergiy Kolodyazhnyy

        71.9k9148314




        71.9k9148314















            Popular posts from this blog

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            張江高科駅