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: -N -vvvv

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

1

2 Answers

-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.

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  -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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest