ssh command -T option

后端 未结 1 1685
梦毁少年i
梦毁少年i 2021-01-05 19:18

I\'m wondering what the -T option in the following command does, cannot see this option in the manual somehow:

$ ssh -T git@gitlab.com
Welcome t         


        
相关标签:
1条回答
  • 2021-01-05 19:49

    I explained before what TTY was: a text terminal is needed when you open an interactive session to a remote server.

    But: in the context of a remote Git repository hosting server (GitHub, Gitlab, BitBucket, ...), no remote server will ever allow you to open an interactive session (for security reason)

    Then only reason why you would still do an ssh -T git@github.com would be to test if you are correctly authenticated, and the session would immediately end with:

    Hi username!  You've successfully authenticated, 
    but GitHub does not provide shell access. 
    

    Since no tty is needed for that test, you should use the -T option when making this test.

    0 讨论(0)
提交回复
热议问题