
Windows users will likely contend that this issue does not impact their platform they are mistaken, as a few clicks in task manager will show: Remote working directory is /home/cfisherħ490 pts/1 S 0:00 psftp -pw foobar4.foobar cat /proc/7490/cmdline scripts relying upon the -pw argument to automate psftp, pscp, or plink do so at the cost of credential exposure, as any shell account can see the process list, on Linux via /proc/*/cmdline and on OpenBSD by other mechanisms. $ psftp -pw foobar4.foobar username "cfisher". This warning is genuine, as is easily demonstrated on Linux: If you possibly can, we recommend you set up public-key authentication instead. This is not recommended for reasons of security. While this warning is found in the general documentation, the risk to Windows users is not prominent: 3.11.3.8 -pw: specify a passwordĪ simple way to automate a remote login is to supply your password on the command line.
#PUTTY SSH PASSWORD MANUAL#
Note that this documentation from the UNIX manual page above is not included in the Windows MSI installer. The password visible to other users of the local machine (via $ man psftp | sed -n '/pw password/,/commands/p' The manual pages for the psftp, pscp, and plink clients bundled within the EPEL package clearly document the risk of exposure with this option: no-sanitise-stderr don't strip control chars from standard errorĬontrol what happens when a log file already exists Manually specify a host key (may be repeated) i key private key file for user authenticationĭisconnect if SSH authentication succeeds trivially 1 -2 force use of particular SSH protocol versionįorce use of particular SSH protocol variant load sessname Load settings from saved session be don't stop batchfile processing if errors pgpfp print PGP key fingerprints and exit Usage: psftp print version information and exit The psftp, pscp, and plink utilities are able to accept a password on the command line, as their usage output describes:

#PUTTY SSH PASSWORD PATCH#
Users with security concerns should obtain the -pwfile functionality, either by applying a patch to the 0.76 stable release, or using a snapshot release found on the PuTTY website.


While the -pw option is attractive for SSH users who are required to use passwords (and forbidden from using keys) for scripting activities, the exposure risk should be understood for any use of the feature. netrc wrapper for psftp are presented, also implemented in Windows under Busybox.
#PUTTY SSH PASSWORD FULL#
Full instructions for applying the backport and a. This feature can be backported into the current 0.76 stable release. There is evidence within the source code that the authors are aware of the problem, but the exposure is confirmed on Microsoft Windows, Oracle Linux, and the package prepared by the OpenBSD project.Īfter discussions with the original author of PuTTY, Simon Tatham developed a new -pwfile option, which will read an SSH password from a file, removing it from the command line. Unfortunately, the 0.74 stable PuTTY release does not safely guard plain-text passwords provided to it via the -pw command line option for the psftp, pscp, and plink utilities as the documentation clearly warns. It has won corporate support and endorsement, and is prepared and bundled within several third-party repositories. PuTTY is one of the oldest and most popular SSH clients, originally for Windows, but now available on several platforms.
