Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssh command -T option

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

$ ssh -T [email protected]
Welcome to GitLab, Simeon !

Could somebody explain?

like image 381
Simeon Leyzerzon Avatar asked Nov 12 '17 03:11

Simeon Leyzerzon


People also ask

What is option in SSH?

The SSH options page allows the RAD to determine the specifics of the SSH protocol that should be used to connect to the devices. Set up SSH options by selecting the SSH Options sub-tab from the Resource Access Data dialog.

What is an option in command line?

Command-line options are commands used to pass parameters to a program. These entries, also called command-line switches, can pass along cues for changing various settings or executing commands in an interface.

What is Option command in Linux?

An option, also referred to as a flag or a switch, is a single-letter or full word that modifies the behavior of a command in some predetermined way. A command is an instruction telling a computer to do something, usually to launch a program.

How do I enter command mode in SSH?

You can start an SSH session in your command prompt by executing ssh user@machine and you will be prompted to enter your password. You can create a Windows Terminal profile that does this on startup by adding the commandline setting to a profile in your settings.


1 Answers

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 [email protected] 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.

like image 129
VonC Avatar answered Nov 16 '22 04:11

VonC