Jwan622
Jwan622

Reputation: 11659

ssh command breakdown. What are the parts?

What does this ssh command do? Specifically I'm confused about the 4 v's

ssh -L 65432:db-001-management.qa001:[email protected] -N -vvvv

What are the 4 v's? What is the N? What is the user.guy part and where is that stored?

Upvotes: 0

Views: 14386

Answers (2)

akjprajapati
akjprajapati

Reputation: 148

-L - forwards your local port over ssh to the remote server.
-N - no shell execution. Just maintain the session to keep the port forwarding alive.
user.guy - this is the user name for ssh login.
V's give you the verbose output of the ssh command. More V's means more verbose but maximum of 3 V's (i.e. -vvv) should be used.

Upvotes: 1

chuckx
chuckx

Reputation: 6937

I'm assuming there's a missing space between the -L flag and the host specification, making the command invocation:

ssh -L 65432:db-001-management.qa001:6432 [email protected] -N -vvvv

Excerpts from the ssh man page:

...destination, which may be specified as either [user@]hostname...

So, user.guy does not get stored beyond being in memory to be used for authentication.

-L local_socket:host:hostport 
Specifies that connections to the given TCP port or Unix socket on the 
local (client) host are to be forwarded to the given host and port, or 
Unix socket, on the remote side.

This sets up a port forwarding such that connections to port 65432 on the system running the client get forwarded to db-001-management.qa001 port 6432, a system that the server presumably has IP connectivity to.

-N 
Do not execute a remote command. This is useful for just forwarding ports.

By default, a shell is started, this flag prevents that.

-v
Verbose mode. Causes ssh to print debugging messages about its progress.
This is helpful in debugging connection, authentication, and 
configuration problems. Multiple -v options increase the verbosity. The 
maximum is 3.

Upvotes: 1

Related Questions