|May the source be with you, but remember the KISS principle ;-)|
|Contents||Bulletin||Scripting in shell and Perl||Network troubleshooting||History||Humor|
|News||WinSCP||Recommended Links||Recommended Papers||OFM Book||History of WinSCP development||OFM Standards|
|Scripting interface||SSH for System Administrators||Passwordless SSH login||scp||sftp||Humor||Etc|
WinSCP is a very good, flexible SFTP client, SCP client, FTPS client and FTP client for Windows. It uses PuTTY format of SSH keys. It can execute PuTTYgen and Pageant (from Tools menu on Login dialog). With a built-in editor that works for remote files it beats competition such as FAR or Total Commander.
The most important advantage of WinSCP over similar tools is that several sessions are supported simultaneously and you can "stack" them in a way you wish. Switching is via convenient horizontal tabs.
WinSCP provides very convenient integrated environment for working with Linux servers because it integrates well with Putty (a unique feature of WinSCP). No need to remember passwords anymore. It can launch Putty with the parameters stored on in WinSCP “sessions" allowing you to connect without further authentication. This ability to launch Putty with authentication settings taken from existing "session" in WinSCP makes it perfect launcher for Putty even if you do not use WinSCP features much.
Multiple sessions can be creates – one for each of your machines. Directories can be compared and newer file transferred to remote server or from the remote server with one click.
You can also compare individual files, which few other OFMs can do.
WinSCP take working with "directories favorites" to a new level. This is actually a very weak feature of FAR and it is absent from Total Commander. In WinSCP you can store frequently used directories inside you session or globally. The same true for windows desktop. If also provides you an ability to store favorites in two ways: per session and globally. computer). This makes it a better sysadmin tool then many other OFMs, as navigating to the necessary directory in other OFMs is a more cumbersome process.
WinSCP allows to edit files on the remote machine using built-in editor which is more user friendly that anything I know. This is unique capability to use standard windows style editor for editing files directly on Linux/Unix server. This is a notepad class editor, simple but very functional:
- Clipboard operations: Copy (
Ctrl+C), Cut (
Ctrl+X), Paste (
- Undo (
Ctrl+Z), Redo (
- Find (
Ctrl+F), Replace (
Ctrl+H), Find next (
- Go to line number (
- Save (
- Save All (
- Reload (
If your file requires a more complex editor you can configure if for specific extension, for example for *.pl you can use Nodepad++ which allow you to use Perl aware editor on remote files without manually transferring files back and forth.
for some extensions instead of editor you can use some other application for example viewer.
There is a setting to allow to open command line at the bottom. The results of the command entered are displayed in a separate screen. There is a built-in history of commands in this screen. Actually a pretty neat implementation of the "third" windows of OFM in GUI environment.
WinSCP also allows to view hidden files and directories Ctrl-Alt-H. Attributes of files can be not only viewed and changed but also changed recursively.
Standard for OFMs command line at the bottom can be activated via Shift-Ctrl-N. Execution of command invoke the third window which has history of commands.
You can synch directories between Windows desktop and remote server and several other more complex things that enhance your productivity (it is a scriptable tool)
Like in any OFM files can be displayed using mask (basic regular expressions) like in ls.
In many corporation this is a default tool for working with Linux servers
It is free and is licensed under GNU license. See History of WinSCP development for more details.
WinSCP offers scripting interface that you can use to automate many operations that it supports, including file transfers, synchronization and other operations. You can use either Windows command interpreter which is adequate for simple tasks, or Windows Scripting Host. For example here is a script that uploads a single file:
option batch abort option confirm off open firstname.lastname@example.org put examplefile.txt /home/user/ exit
Assemble the commands into a script file. You can name the script file as you like. Use the /script command line option to pass the script to the WinSCP executable. You can embed the complete command line into a Windows batch file (.bat), like as follows:
@echo off winscp.com /script=myscript.txt
Make shortcut to it on desktop to ease execution. Either make shortcut to batch file (.bat) or enter full command line to shortcut itself.
If the wrapping batch file takes filename as command line parameter (see below) you can: Make shortcut to it on desktop and use it by dropping files on the icon. Windows automatically run the batch file and passes path to dropped file as command-line parameter.
In a similar way you can put the shortcut to the batch file into Explorer’s ‘Send To’ context menu (c:\documents and settings\username\sendto).
WinSCP is also available as a plugin for other file managers. FAR has such a plugin (older version, no longer supported). Much less populat Altap Salamander also has a plugin.
The file transfer program WinSCP allows you to transfer files between your iPod and computer. While the iTunes program does not allow you to put your own files on the iPod, WinSCP allows you to do this over a Wi-Fi connection. After you connect to your iPod through Wi-Fi, you can then upload videos, songs or applications, that you did not purchase from iTunes.
WinSCP works fine under Wine, and has support for encrypted PuTTY keys, unlike FileZilla. That's why I've dumped FZ and installed Wine+WinSCP, it's more work but well worth it.
Ctrl+Backspaceworks in path edit boxes to deletes the word before cursor
Site tree on Login dialog responds to mouse wheel
Local path pattern (
!\) for custom commands.
Remembering the last working directories in a workspace
Shiftkeys while running a local custom command copies the command to clipboard instead of executing it.
Passportauthentication to allow WebDAV access to Microsoft OneDrive.
Found files can be downloaded and deleted on the Find dialog
!Ppattern in PuTTY command implies that password should be remembered.
-pwargument is added to PuTTY command-line, even when
!Ppattern is used.
Custom commands can be distributed in a form of WinSCP extension.
Session name (
!N) and port number (
!#) patterns for custom commands and terminal client path
ssh://URLs and opening them in PuTTY.
Hidden files are hidden by default.
Ctrl+Alt+Ffor Filter command
Alternate delete on
Shift-Clickon Delete command in file context menu
Session can be opened in PuTTY from Login dialog
!Uin Custom command and PuTTY path works even with password entered only during authentication.
Ctrl+Spaceshortcut for toggling selection of focused file works in Commander-style selection mode.
Ctrl+Wshortcut for closing tab (session).
;,|<>in file masks can be used as literals by doubling them.
Computer can be suspended when operation completes.
Command to copy find results to clipboard
Configurable file panel font size.
WinSCP has an integrated simple text editor you can use to edit remote or local text files. If you want to use a more complex editor or edit binary files, you need to set up external editor. The editor capabilities are similar to those of Notepad (simple editor shipped with Windows):
Behavior of internal text editor can be configured in preferences.
To find files or subdirectories in remote directory1) go to Commands > Find Files.
You will be prompted with Find dialog to specify filter for finding. The results of search will appear in the same dialog.
Searching for text in files is not supported using the Find dialog. But you can use an official extension Search recursively for text in remote directory.
Tips to export/import putty/Winscp sessions
Exporting your PuTTy saved sessions
1. Click Start->Run and type "RegEdt32" in the "Open" dialog. Click "Ok"
2. Drill into HKEY_CURRENT_USER\Software\SimonTatham
3. Click File->Export. Give your file an appropriate name like, "putty.reg" and click "Save"
4. We're done! Save the putty.reg file somewhere safe. The file doesn't contain any passwords or actual SSH key values so, it's relatively safe from prying eyes. Still, it does contain your configuration and that kind of data is a private matter.
Importing your PuTTy Configuration
1.To import your saved PuTTy configuration on any other Windows computer simply copy your exported registry key, right click on the file and click "Merge
2.Windows will ask you for confirmation that you want to import this set of registry values.
Last week a student on my course gave me a tip. Personally, I prefer to use Veeam's FastSCP for ESX Server when transferring files from my Windows Desktop to ESX 3. However, occasionally in the lab environments I work in I have to use WinSCP which is slower. One thing I have observed is if I copy a file such as an ISO to a VMFS volume, then WinSCP gives me an error. Basically, what happens is though the files get copied to the VMFS volume – and error occurs when renaming the file from say – w2k3sp2.iso.filepart to w2k3sp2.iso. This is caused by the "Resume" feature in WinSCP which is intended to pickup an upload when it fails from where it failed, rather than starting the upload from the beginning. It appears as VMFS doesn't support this functionality.
The solution to this problem is a work-around. To disable the "Resume" feature in the WinSCP software. I don't mind doing this. Everything is gigabit in the lab environments I work in and very reliable so I don't really need the resume feature. To disable the WinSCP "Resume" feature do the following:
In the menu choose, Options and Preferences
Under Transfer, select Resume
Under "Enable transfer resume for", select Disable
Under "Automatic Reconnect", disable "Automatic reconnect session, if it breaks during transfer"
This version is the first stable release of 5.x branch. The new features of 5.x include:
- Unicode/UTF8 support.
- Tab selector for sessions.
- Support for taskbar jump list on Windows 7.
- Support for MLSD/MLST FTP commands.
- .NET assembly built around WinSCP scripting interface.