Patches to PuTTY for gcloud compute ssh on Windows.
Patches PuTTY for Windows source code (2014-05-21 snapshot) so that after renaming
copy pscp.exe scp.execopy plink.exe ssh.execopy pkeygen.exe ssh-keygen.exe
scp, ssh and ssh-keygen, from the command line, behave more like the
OpenSSH counterparts. Some behaviors are not covered -- mainly just enough to
support internal gcloud usage patterns.
Changes fall into a few categories:
- Change
cmdgen.cto generate pkeygen.exe which acts likessh-keygenfrom the command line. Most of the changes are in this file. Major changes:- use Windows libraries to generate cryptographic random data
- output refactored to a loop that can generate more than one file
id,id.pubandid.ppkall generated by default
- Change all identity file read acceses to first check for a .ppk variant, e.g.,
-i idwill first check forid.ppk. This preserves thesshandscp -iusage pattern. - Change the default
TERMenvironment variable value passed to the server byplinkto check the localTERMsetting (instead of "xterm"). IfTERMis not set then "dumb" is used. This gives the proper hint to remote.profilesto refrain from colorizing prompts andls(1)output. - Eliminate the low hanging fruit of the MSVC 32 and 64 bit warnings. Most of
these involve mixed combinations of
[unsigned] int,[unsigned] long,size_t, andssize_t. Some only show up in 64 bit compilers. Other culprits arestrcpy(),strcat(), andsprintf()into fixed size buffers - they are handled by a homebrewszprintf()that supports a clean sized buffer paradigm. Much more work is needed in this area. A lot of the(int)and(size_t)casts should be replaced by proper variable and function typing, but that would require a meticulous code walkthrough.
Glenn S. Fowler, Google, 2014.
For questions and feedback, use "gcloud" tag on StackOverflow, check out the Google Cloud SDK's groups page or send an e-mail directly to google-cloud-sdk@googlegroups.com.
Found a bug? File it in Cloud SDK issue tracker.