Differences
This shows you the differences between the selected revisions of the page.
integration_putty 2022-05-13 | integration_putty 2024-10-22 (current) | ||
Line 25: | Line 25: | ||
By default, WinSCP creates temporary site settings for PuTTY (under the name "WinSCP temporary session"). The site settings will by default contain only the options | By default, WinSCP creates temporary site settings for PuTTY (under the name "WinSCP temporary session"). The site settings will by default contain only the options | ||
known by WinSCP, mostly connection options. It will particularly lack | known by WinSCP, mostly connection options. It will particularly lack | ||
- | any terminal options, so the defaults will apply. To change the defaults, either modify the //"Default Settings"// profile in PuTTY. Or configure PuTTY settings on [[ui_login_environment|//Environment// page]] of Advanced Site Settings dialog. | + | any terminal options, so the defaults will apply. To change the defaults, either modify the //"Default Settings"// profile in PuTTY. Or configure PuTTY settings on [[ui_login_environment|//Environment// page]] of Advanced Site Settings dialog. Alternatively, you can save PuTTY site settings·with the same name as a WinSCP site. WinSCP will then instruct PuTTY·to open that session (It will not export any settings, nor connection options). |
- | + | ||
- | If you want to configure your own session-specific options, you can save PuTTY site settings | + | |
- | with the same name as a WinSCP site. WinSCP will then instruct PuTTY | + | |
- | to open that session (It will not export any settings, nor connection options). | + | |
If WinSCP cannot find the PuTTY executable in the default path (particularly when you are using a derived version of PuTTY) you can specify the path in [[ui_pref_integration_app|preferences]]. Optionally you can also instruct WinSCP to send a session password ([[security_credentials|if known]]) to PuTTY. However, a better approach would be to use [[public key]] authentication together with [[ui_pageant|Pageant]]. | If WinSCP cannot find the PuTTY executable in the default path (particularly when you are using a derived version of PuTTY) you can specify the path in [[ui_pref_integration_app|preferences]]. Optionally you can also instruct WinSCP to send a session password ([[security_credentials|if known]]) to PuTTY. However, a better approach would be to use [[public key]] authentication together with [[ui_pageant|Pageant]]. | ||
Line 48: | Line 44: | ||
As PuTTY needs the session startup command to be stored in a file, you need to make use of ''!`command`'' [[ui_pref_integration_app#client_path|pattern]] to store the above command into a temporary file. Also as use of the ''-m'' switch implies a non-interactive terminal, you need to force an interactive terminal back using a ''-t'' switch. | As PuTTY needs the session startup command to be stored in a file, you need to make use of ''!`command`'' [[ui_pref_integration_app#client_path|pattern]] to store the above command into a temporary file. Also as use of the ''-m'' switch implies a non-interactive terminal, you need to force an interactive terminal back using a ''-t'' switch. | ||
- | A complete PuTTY command line for this will be like (change the shell path according to your system and preferences): | + | A complete [[ui_pref_integration_app|PuTTY command line]] for this will be like (change the shell path according to your system and preferences): |
<code custom-command-local> | <code custom-command-local> | ||
Line 102: | Line 98: | ||
==== [[wt]] Win32-OpenSSH in Windows Terminal ==== | ==== [[wt]] Win32-OpenSSH in Windows Terminal ==== | ||
- | For a better experience, you can execute the ''ssh'' in [[https://www.microsoft.com/store/apps/9n0dx20hk701|Windows Terminal app]]: | + | For a better experience, you can execute the ''ssh'' in [[https://apps.microsoft.com/detail/9n0dx20hk701|Windows Terminal app]]: |
<code custom-command-local> | <code custom-command-local> | ||
wt.exe ssh.exe !U@!@ -p !# -t "cd !/ \; /bin/bash --login" | wt.exe ssh.exe !U@!@ -p !# -t "cd !/ \; /bin/bash --login" | ||
</code> | </code> | ||
- | Note the escaped semicolon. //You need the latest version of WinSCP for this to work.// &recent | + | Note the escaped semicolon. |
+ | |||
+ | Adding ''-w 0'' parameter opens a new tab in existing Windows Terminal windows instead of new window. | ||
==== [[wsl]] WSL ==== | ==== [[wsl]] WSL ==== | ||
- | If you want to use OpenSSH ''ssh'' client in [[https://docs.microsoft.com/en-us/windows/wsl/about|Windows Subsystem for Linux]],((Also known as "Bash on Ubuntu on Windows".)) instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64 | + | If you want to use OpenSSH ''ssh'' client in [[https://learn.microsoft.com/en-us/windows/wsl/about|Windows Subsystem for Linux]],((Also known as "Bash on Ubuntu on Windows".)) instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64 |
<code custom-command-local> | <code custom-command-local> | ||
Line 117: | Line 115: | ||
</code> | </code> | ||
- | Also, make sure that [[ui_pref_integration_app#other_options|//Remember session password and pass it to PuTTY//]] is turned off. Or use [[https://packages.debian.org/buster/sshpass|''sshpass'' package]] to allow passing the password on the commandline. | + | Also, make sure that [[ui_pref_integration_app#other_options|//Remember session password and pass it to PuTTY//]] is turned off. Or use [[https://packages.debian.org/buster/sshpass|''sshpass'' package]] to allow passing the password on the command-line. |
You can also have the remote shell open in the same working directory as WinSCP, using a [[integration_putty#putty_startup_directory|similar trick as with PuTTY]]: | You can also have the remote shell open in the same working directory as WinSCP, using a [[integration_putty#putty_startup_directory|similar trick as with PuTTY]]: |