» WinSSH
The WinSSH communicator is built specifically for the Windows nativeport of OpenSSH. It does not rely on a POSIX-like environment whichremoves the requirement of extra software installation (like cygwin)for proper functionality.
For more information, see the Win32-OpenSSH project page.
» WinSSH Settings
The WinSSH communicator uses the same connection configuration optionsas the SSH communicator. These settings provide the information for thecommunicator to establish a connection to the VM.
The configuration options below are specific to the WinSSH communicator.
Config namespace: config.winssh
» Available Settings
config.winssh.forward_agent
(boolean) - Iftrue
, agent forwarding over SSHconnections is enabled. Defaults to false.config.winssh.forward_env
(array of strings) - An array of host environmentvariables to forward to the guest. If you are familiar with OpenSSH, this correspondsto theSendEnv
parameter.
config.winssh.forward_env = ["CUSTOM_VAR"]
config.winssh.proxy_command
(string) - A command-line command to execute thatreceives the data to send to SSH on stdin. This can be used to proxy the SSH connection.%h
in the command is replaced with the host and%p
is replaced with the port.config.winssh.keep_alive
(boolean) - Iftrue
, this setting SSH will send keep-alivepackets every 5 seconds by default to keep connections alive.config.winssh.shell
(string) - The shell to use when executing SSH commands fromVagrant. By default this iscmd
. Valid values are"cmd"
or"powershell"
.Note that this has no effect on the shell you get when you runvagrant ssh
.This configuration option only affects the shell to use when executing commandsinternally in Vagrant.config.winssh.export_command_template
(string) - The template used to generateexported environment variables in the active session. This can be usefulwhen using a Bourne incompatible shell like C shell. The template supportstwo variables which are replaced with the desired environment variable key andenvironment variable value:%ENV_KEY%
and%ENV_VALUE%
. The default templatefor acmd
configured shell is:
config.winssh.export_command_template = 'set %ENV_KEY%="%ENV_VALUE%"'
The default template for a powershell
configured shell is:
config.winssh.export_command_template = '$env:%ENV_KEY%="%ENV_VALUE%"'
config.winssh.sudo_command
(string) - The command to use when executing a commandwithsudo
. This defaults to%c
(assumes vagrant user is an administratorand needs no escalation). The%c
will be replaced by the command that isbeing executed.config.winssh.upload_directory
(string) - The upload directory used on the guestto store scripts for execute. This is set toC:\Windows\Temp
by default.