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.exe
copy plink.exe ssh.exe
copy 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.c
to generate pkeygen.exe which acts likessh-keygen
from 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.pub
andid.ppk
all generated by default
- Change all identity file read acceses to first check for a .ppk variant, e.g.,
-i id
will first check forid.ppk
. This preserves thessh
andscp -i
usage pattern. - Change the default
TERM
environment variable value passed to the server byplink
to check the localTERM
setting (instead of "xterm"). IfTERM
is not set then "dumb" is used. This gives the proper hint to remote.profiles
to 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.