Differences

This shows you the differences between the selected revisions of the page.

2020-02-06 2020-02-06
using %SystemRoot% instead of hardcoding c:\windows (martin) custom commands syntax highlighting (martin)
Line 42: Line 42:
For example with a Unix-like system and a ''bash'' shell, the command will be like (note the ''!/'' [[ui_pref_integration_app#client_path|pattern]] to pass the current remote path): For example with a Unix-like system and a ''bash'' shell, the command will be like (note the ''!/'' [[ui_pref_integration_app#client_path|pattern]] to pass the current remote path):
-<code>+<code custom-command>
cd "!/" ; /bin/bash -login cd "!/" ; /bin/bash -login
</code> </code>
Line 50: Line 50:
A complete PuTTY command line for this will be like (change the shell path according to your system and preferences): A complete PuTTY command line for this will be like (change the shell path according to your system and preferences):
-<code>+<code custom-command>
"%ProgramFiles%\PuTTY\putty.exe" -t -m "%TEMP%\putty.txt" !`cmd.exe /c echo cd "!/" ; /bin/bash -login > "%TEMP%\putty.txt"` "%ProgramFiles%\PuTTY\putty.exe" -t -m "%TEMP%\putty.txt" !`cmd.exe /c echo cd "!/" ; /bin/bash -login > "%TEMP%\putty.txt"`
</code> </code>
Line 68: Line 68:
When using KiTTY in portable mode, you need to specify patterns ''!U@!@ -P !#'' in terminal client path as an alternative way to pass hostname, username and port number to KiTTY. You may also use ''%%-title "!N"%%'' to pass a session name. When using KiTTY in portable mode, you need to specify patterns ''!U@!@ -P !#'' in terminal client path as an alternative way to pass hostname, username and port number to KiTTY. You may also use ''%%-title "!N"%%'' to pass a session name.
-<code>+<code custom-command>
kitty.exe !U@!@ -P !# -title "!N" kitty.exe !U@!@ -P !# -title "!N"
</code> </code>
Line 74: Line 74:
To open KiTTY in the same directory as WinSCP, you can use either the same [[#putty_startup_directory|technique as with PuTTY]]; or use KiTTY's [[https://www.9bis.net/kitty/#!pages/CommandLine.md|''-cmd'' switch]] to avoid use of temporary file: To open KiTTY in the same directory as WinSCP, you can use either the same [[#putty_startup_directory|technique as with PuTTY]]; or use KiTTY's [[https://www.9bis.net/kitty/#!pages/CommandLine.md|''-cmd'' switch]] to avoid use of temporary file:
-<code>+<code custom-command>
kitty.exe -cmd "cd '!/'" kitty.exe -cmd "cd '!/'"
</code> </code>
Line 86: Line 86:
If you want to use Win32-OpenSSH ''ssh'' client from, instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64 If you want to use Win32-OpenSSH ''ssh'' client from, instead of PuTTY, you need to configure the following command [[ui_pref_integration_app|preferences]]: &winpath &win64
-<code>+<code custom-command>
%SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !# %SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !#
</code> </code>
Line 94: Line 94:
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]]:
-<code>+<code custom-command>
%SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !# -t "cd !/ ; /bin/bash" %SystemRoot%\Sysnative\OpenSSH\ssh.exe !U@!@ -p !# -t "cd !/ ; /bin/bash"
</code> </code>
Line 104: Line 104:
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://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
-<code>+<code custom-command>
"%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !#" "%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !#"
</code> </code>
Line 112: Line 112:
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]]:
-<code>+<code custom-command>
"%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !# -t 'cd !/ ; /bin/bash'" "%SystemRoot%\Sysnative\bash.exe" -c "ssh !U@!@ -p !# -t 'cd !/ ; /bin/bash'"
</code> </code>
Line 120: Line 120:
If you want to run the ''ssh'' in more advanced console window, you can use for example [[https://conemu.github.io/|ConEmu]]: &winpath &win32 &win64 If you want to run the ''ssh'' in more advanced console window, you can use for example [[https://conemu.github.io/|ConEmu]]: &winpath &win32 &win64
-<code>+<code custom-command>
"C:\Program Files\ConEmu\ConEmu64.exe" -run bash.exe -c "ssh !U@!@ -p !#" "C:\Program Files\ConEmu\ConEmu64.exe" -run bash.exe -c "ssh !U@!@ -p !#"
</code> </code>

Last modified: by martin