1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
Commit Graph

234 Commits

Author SHA1 Message Date
Jacob Nevins
557164b043 Tweaks to SUPDUP documentation.
Including noting that it can't be used with Plink, and better indexing.
2021-02-21 16:44:51 +00:00
Simon Tatham
2762a2025f Merge the 0.74 release branch back to master.
Two minor memory-leak fixes on 0.74 seem not to be needed on master:
the fix in an early exit path of pageant_add_keyfile is done already
on master in a different way, and the missing sfree(fdlist) in
uxsftp.c is in code that's been completely rewritten in the uxcliloop
refactoring.

Other minor conflicts: the rework in commit b52641644905 of
ssh1login.c collided with the change from FLAG_VERBOSE to
seat_verbose(), and master and 0.74 each added an unrelated extra
field to the end of struct SshServerConfig.
2020-06-27 08:11:22 +01:00
Simon Tatham
08f1e2a506 Add an option to disable the dynamic host key policy.
This mitigates CVE-2020-14002: if you're in the habit of clicking OK
to unknown host keys (the TOFU policy - trust on first use), then an
active attacker looking to exploit that policy to substitute their own
host key in your first connection to a server can use the host key
algorithm order in your KEXINIT to (not wholly reliably) detect
whether you have a key already stored for this host, and if so, abort
their attack to avoid giving themself away.

However, for users who _don't_ use the TOFU policy and instead check
new host keys out of band, the dynamic policy is more useful. So it's
provided as a configurable option.
2020-06-21 16:39:47 +01:00
Lars Brinkhoff
63e0c66739 Documentation for SUPDUP. 2020-03-10 07:11:32 +00:00
Jacob Nevins
e85b159d87 Minimally document key generation novelties.
Covers Ed448 (and the user interface change to "EdDSA"), and the prime
generation method. (Both of these need better words, really.)
2020-03-02 23:36:09 +00:00
Simon Tatham
22b492c4f6 New protocol: PROT_SSHCONN, bare ssh-connection.
This is the same protocol that PuTTY's connection sharing has been
using for years, to communicate between the downstream and upstream
PuTTYs. I'm now promoting it to be a first-class member of the
protocols list: if you have a server for it, you can select it in the
GUI or on the command line, and write out a saved session that
specifies it.

This would be completely insecure if you used it as an ordinary
network protocol, of course. Not only is it non-cryptographic and wide
open to eavesdropping and hijacking, but it's not even _authenticated_
- it begins after the userauth phase of SSH. So there isn't even the
mild security theatre of entering an easy-to-eavesdrop password, as
there is with, say, Telnet.

However, that's not what I want to use it for. My aim is to use it for
various specialist and niche purposes, all of which involve speaking
it over an 8-bit-clean data channel that is already set up, secured
and authenticated by other methods. There are lots of examples of such
channels:

 - a userv(1) invocation
 - the console of a UML kernel
 - the stdio channels into other kinds of container, such as Docker
 - the 'adb shell' channel (although it seems quite hard to run a
   custom binary at the far end of that)
 - a pair of pipes between PuTTY and a Cygwin helper process
 - and so on.

So this protocol is intended as a convenient way to get a client at
one end of any those to run a shell session at the other end. Unlike
other approaches, it will give you all the SSH-flavoured amenities
you're already used to, like forwarding your SSH agent into the
container, or forwarding selected network ports in or out of it, or
letting it open a window on your X server, or doing SCP/SFTP style
file transfer.

Of course another way to get all those amenities would be to run an
ordinary SSH server over the same channel - but this approach avoids
having to manage a phony password or authentication key, or taking up
your CPU time with pointless crypto.
2020-02-22 18:42:13 +00:00
Simon Tatham
5d718ef64b Whitespace rationalisation of entire code base.
The number of people has been steadily increasing who read our source
code with an editor that thinks tab stops are 4 spaces apart, as
opposed to the traditional tty-derived 8 that the PuTTY code expects.

So I've been wondering for ages about just fixing it, and switching to
a spaces-only policy throughout the code. And I recently found out
about 'git blame -w', which should make this change not too disruptive
for the purposes of source-control archaeology; so perhaps now is the
time.

While I'm at it, I've also taken the opportunity to remove all the
trailing spaces from source lines (on the basis that git dislikes
them, and is the only thing that seems to have a strong opinion one
way or the other).
    
Apologies to anyone downstream of this code who has complicated patch
sets to rebase past this change. I don't intend it to be needed again.
2019-09-08 20:29:21 +01:00
Jacob Nevins
8e6b1fd694 Docs: reorder Bugs/More bugs docs to match code.
The panels were rearranged in ab433e8073.
No textual change other than the rearrangement.
2019-04-19 15:49:05 +01:00
Jacob Nevins
6c9b1ffb2b Make docs match code for a couple of settings. 2019-04-19 15:49:05 +01:00
Jacob Nevins
464e351c7b Remove most traces of WinHelp support.
Remove the 'winhelp-topic' IDs from the Halibut source, and from the
code. Now we have one fewer name to think of every time we add a
setting.

I've left the HELPCTX system in place, with the vague notion that it
might be a useful layer of indirection for some future help system on a
platform like Mac OS X.

(I've left the putty.hlp target in doc/Makefile, if nothing else because
this is a convenient test case for Halibut's WinHelp support. But the
resulting help file will no longer support context help.)
2019-03-26 00:27:04 +00:00
Jacob Nevins
190761a272 Rework copy/paste documentation a bit.
Try harder to distinguish PuTTY's behaviour when run on Windows and on
Unix.
2019-03-24 13:30:41 +00:00
Jonathan Liu
822d2fd4c3 Add option whether to include header when logging.
It is useful to be able to exclude the header so that the log file
can be used for realtime input to other programs such as Kst for
plotting live data from sensors.
2018-09-26 12:13:01 +01:00
Jacob Nevins
7d0ade7eac Tweak docs for GSSAPI key exchange. 2018-05-20 13:57:35 +01:00
Simon Tatham
6afa955a2e Option to support VT100 line drawing in UTF-8 mode.
Thanks to Jiri Kaspar for sending this patch (apart from the new docs
section, which is in my own words), which implements a feature we've
had as a wishlist item ('utf8-plus-vt100') for a long time.

I was actually surprised it was possible to implement it in so few
lines of code! I'd forgotten, or possibly never noticed in the first
place, that even in UTF-8 mode PuTTY not only accepts but still
_processes_ all the ISO 2022 control sequences and shift characters,
and keeps running track of all the same state in term->cset and
term->cset_attrs that it tracks in IS0-2022-enabled modes. It's just
that in UTF-8 mode, at the very last minute when a character+attribute
pair is about to be written into the terminal's character buffer, it
deliberately ignores the contents of those variables.

So all that was needed was a new flag checked at that last moment
which causes it not quite to ignore them after all, and bingo,
utf8-plus-vt100 is supported. And it works no matter which ISO 2022
sequences you're using; whether you're using ESC ( 0 to select the
line drawing set directly into GL and ESC ( B to get back when you're
done, or whether you send a preliminary ESC ( B ESC ) 0 to get GL/GR
to be ASCII and line drawing respectively so you can use SI and SO as
one-byte mode switches thereafter, both work just as well.

This implementation strategy has a couple of consequences, which I
don't think matter very much one way or the other but I document them
just in case they turn out to be important later:

 - if an application expecting this mode has already filled your
   terminal window with lqqqqqqqqk, then enabling this mode in Change
   Settings won't retroactively turn them into the line drawing
   characters you wanted, because no memory is preserved in the screen
   buffer of what the ISO 2022 state was when they were printed. So
   the application still has to do a screen refresh.

 - on the other hand, if you already sent the ESC ( 0 or whatever to
   put the terminal _into_ line drawing mode, and then you turn on
   this mode in Change Settings, you _will_ still be in line drawing
   mode, because the system _does_ remember your current ISO 2022
   state at all times, whether it's currently applying it to output
   printing characters or not.
2018-05-12 08:48:20 +01:00
Simon Tatham
223ea4d1e6 Make GSS kex and GSS userauth separately configurable.
The former has advantages in terms of keeping Kerberos credentials up
to date, but it also does something sufficiently weird to the usual
SSH host key system that I think it's worth making sure users have a
means of turning it off separately from the less intrusive GSS
userauth.
2018-04-26 19:15:15 +01:00
Simon Tatham
d944aa4096 Mention SSPI explicitly in the documentation.
This was originally sent in as part of the GSSAPI patch, but I've
extracted into a separate commit because that patch was more than
complicated enough by itself.
2018-04-26 07:21:28 +01:00
Simon Tatham
d515e4f1a3 Support GSS key exchange, for Kerberos 5 only.
This is a heavily edited (by me) version of a patch originally due to
Nico Williams and Viktor Dukhovni. Their comments:

 * Don't delegate credentials when rekeying unless there's a new TGT
   or the old service ticket is nearly expired.

 * Check for the above conditions more frequently (every two minutes
   by default) and rekey when we would delegate credentials.

 * Do not rekey with very short service ticket lifetimes; some GSSAPI
   libraries may lose the race to use an almost expired ticket. Adjust
   the timing of rekey checks to try to avoid this possibility.

My further comments:

The most interesting thing about this patch to me is that the use of
GSS key exchange causes a switch over to a completely different model
of what host keys are for. This comes from RFC 4462 section 2.1: the
basic idea is that when your session is mostly bidirectionally
authenticated by the GSSAPI exchanges happening in initial kex and
every rekey, host keys become more or less vestigial, and their
remaining purpose is to allow a rekey to happen if the requirements of
the SSH protocol demand it at an awkward moment when the GSS
credentials are not currently available (e.g. timed out and haven't
been renewed yet). As such, there's no need for host keys to be
_permanent_ or to be a reliable identifier of a particular host, and
RFC 4462 allows for the possibility that they might be purely
transient and only for this kind of emergency fallback purpose.

Therefore, once PuTTY has done a GSS key exchange, it disconnects
itself completely from the permanent host key cache functions in
storage.h, and instead switches to a _transient_ host key cache stored
in memory with the lifetime of just that SSH session. That cache is
populated with keys received from the server as a side effect of GSS
kex (via the optional SSH2_MSG_KEXGSS_HOSTKEY message), and used if
later in the session we have to fall back to a non-GSS key exchange.
However, in practice servers we've tested against do not send a host
key in that way, so we also have a fallback method of populating the
transient cache by triggering an immediate non-GSS rekey straight
after userauth (reusing the code path we also use to turn on OpenSSH
delayed encryption without the race condition).
2018-04-26 07:21:16 +01:00
Jacob Nevins
c67389e1fb Document 'Permit control characters in pasted text'
And the consequent GUI rearrangements.
2018-03-24 15:35:46 +00:00
Jacob Nevins
c971c428f3 Update copy and paste documentation.
Rewrite the "Using PuTTY" section for 'clipboard-generality', and also
explain why we default to mouse-based selection, interaction with other
applications via PRIMARY when running PuTTY on Unix, and bracketed-paste
mode. Also add lots of index terms.
2018-02-04 12:27:17 +00:00
Simon Tatham
2a76f8d4a2 Support custom clipboard names under X.
This required me to turn the drop-lists into combo boxes and add an
extra string-typed Conf setting alongside each enumerated value.
2017-12-17 18:49:00 +00:00
Simon Tatham
0e7f0883a9 Add GUI configuration for choice of clipboards.
On all platforms, you can now configure which clipboard the mouse
pastes from, which clipboard Ctrl-Ins and Shift-Ins access, and which
Ctrl-Shift-C and Ctrl-Shift-V access. In each case, the options are:

 - nothing at all
 - a clipboard which is implicitly written by the act of mouse
   selection (the PRIMARY selection on X, CLIP_LOCAL everywhere else)
 - the standard clipboard written by explicit copy/paste UI actions
   (CLIPBOARD on X, the unique system clipboard elsewhere).

Also, you can control whether selecting text with the mouse _also_
writes to the explicitly accessed clipboard.

The wording of the various messages changes between platforms, but the
basic UI shape is the same everywhere.
2017-12-17 17:02:56 +00:00
Simon Tatham
98fa733a96 Move char-class list box out into a new config panel.
This makes space in the Selection panel (at least on Windows; it
wasn't overfull on Unix) to add a new set of config options
controlling the mapping of UI actions to clipboards.

(A possible future advantage of having spare space in this new Words
panel is that there's room to add controls for context-sensitive
special-casing, e.g. I'd quite like ':' to be treated differently when
it appears as part of "http://".)
2017-12-17 16:38:41 +00:00
Simon Tatham
2f9738a282 Make terminal true-colour mode configurable.
I know some users don't like any colour _at all_, and we have a
separate option to turn off xterm-style 256-colour sequences, so it
seems remiss not to have an option to disable true colour as well.
2017-10-05 21:04:23 +01:00
Jacob Nevins
05f499e55f Add 'passthrough printing' as an index term. 2017-06-06 09:34:21 +01:00
Jacob Nevins
fb023da0fd Be less vague in the description of IUTF8. 2017-04-30 10:42:02 +01:00
Jacob Nevins
ed600ab23f Fix double negative in TTY mode docs. 2017-04-29 14:24:17 +01:00
klemens
89fff90de7 Spelling fixes (just in comments).
As found by a bot ( http://www.misfix.org,
https://github.com/ka7/misspell_fixer ).
2017-04-15 17:47:10 +01:00
Jacob Nevins
2d0b2e97d0 Restore ability to not send SSH terminal modes.
2ce0b680c inadvertently removed this ability in trying to ensure that
everyone got the new IUTF8 mode by default; you could remove a mode from
the list in the UI, but this would just revert PuTTY to its default.

The UI and storage have been revamped; the storage format now explicitly
says when a mode is not to be sent, and the configuration UI always
shows all modes known to PuTTY; if a mode is not to be sent it now shows
up as "(don't send)" in the list.

Old saved settings are migrated so as to preserve previous removals of
longstanding modes, while automatically adding IUTF8.

(In passing, this removes a bug where pressing the 'Remove' button of
the previous UI would populate the value edit box with garbage.)
2017-03-06 10:36:26 +00:00
Jacob Nevins
bd65d47792 New FAQ entry for 32-bit vs 64-bit. 2017-02-19 16:46:23 +00:00
Jacob Nevins
33f4c8303f Document proxy logging control.
(This was added in 7c65b9c57.)
2017-02-11 23:30:52 +00:00
Jacob Nevins
e4ad487fec Reference '-proxycmd' from main local proxy docs. 2017-02-04 12:05:14 +00:00
Simon Tatham
fa91b55eec Make ESC[3J (clear scrollback) a disableable escape sequence.
A user complained that it was being done nonconsensually, and it seems
reasonable that the user should have the choice to prevent it.
2016-11-17 20:25:27 +00:00
Jacob Nevins
1de7240eb8 Document SSH IUTF8 mode. 2016-05-07 11:36:55 +01:00
Jacob Nevins
34add87ad2 Put DH group1-sha1 KEX below 'warn' by default.
Also try to upgrade the settings of people who haven't changed the
defaults; but anyone who has, or anyone who's used the pre-release
snapshots with elliptic-curve support, will have to review their
settings manually.
2016-04-10 19:35:08 +01:00
Jacob Nevins
16dfefcbde Stop supporting fallback between SSH versions.
The UI now only has "1" and "2" options for SSH protocol version, which
behave like the old "1 only" and "2 only" options; old
SSH-N-with-fallback settings are interpreted as SSH-N-only.

This prevents any attempt at a protocol downgrade attack.
Most users should see no difference; those poor souls who still have to
work with SSH-1 equipment now have to explicitly opt in.
2016-04-02 12:46:04 +01:00
Jacob Nevins
15386cbe92 Cross-reference all the host key docs.
And tweak some of the words a bit.
2016-03-26 17:38:49 +00:00
Simon Tatham
d06098622c Configurable preference list for SSH host key types.
Now we actually have enough of them to worry about, and especially
since some of the types we support are approved by organisations that
people might make their own decisions about whether to trust, it seems
worth having a config list for host keys the same way we have one for
kex types and ciphers.

To make room for this, I've created an SSH > Host Keys config panel,
and moved the existing host-key related configuration (manually
specified fingerprints) into there from the Kex panel.
2016-03-25 16:32:17 +00:00
Jacob Nevins
28f67586f5 Document host key cross-certification. 2016-03-25 15:43:28 +00:00
Jacob Nevins
de24c12e46 Logical host name: minor rewording. 2016-03-25 15:43:28 +00:00
Jacob Nevins
98e5eeedd1 Demote SSH bypass-auth option; downplay in docs.
It's too esoteric to be the first thing on the Auth panel; I've never
heard of any SSH server that supports it in the decade since I
implemented it. The only Google hits are lost souls mistakenly believing
they need it for passwordless public-key login and the like.
2016-03-25 15:43:28 +00:00
Jacob Nevins
2aa8d81c2d Document that -i etc now accept public key files.
(This was added in 4204a53.)
2016-03-19 23:43:21 +00:00
Jacob Nevins
48eafd66aa Update docs/usage for 'plink -shareexists'. 2015-10-22 01:48:35 +01:00
Jacob Nevins
9dd9860cc8 Update docs for Ed25519 and ChaCha20-Poly1305. 2015-10-22 01:48:02 +01:00
Simon Tatham
0550943b51 New formatting directive in logfile naming: &P for port number.
Users have requested this from time to time, for distinguishing log
file names when there's more than one SSH server running on different
ports of the same host. Since we do take account of that possibility
in other areas (e.g. we cache host keys indexed by (host,port) rather
than just host), it doesn't seem unreasonable to do so here too.
2015-08-08 13:35:44 +01:00
Simon Tatham
84e239dd88 Divide the Bugs panel in half.
It overflowed as a result of the previous commit.
2015-04-25 10:54:18 +01:00
Simon Tatham
62a1bce7cb Support RFC 4419.
PuTTY now uses the updated version of Diffie-Hellman group exchange,
except for a few old OpenSSH versions which Darren Tucker reports only
support the old version.

FIXME: this needs further work because the Bugs config panel has now
overflowed.
2015-04-25 10:54:18 +01:00
Jacob Nevins
80bd6a01aa Minimal documentation for ECDSA/ECDH support. 2015-02-28 19:08:15 +00:00
Jacob Nevins
8dedf59080 Remove user-key-oriented advice from host key docs.
It would be rare to have a host keypair in .ppk format or on a client
machine to load into PuTTYgen, and it might confuse people into thinking
they are required to do so.
2015-01-18 14:50:08 +00:00
Jacob Nevins
aad5f5601d Document IPv6 literal syntax for tunnels. 2014-11-08 23:37:59 +00:00
Jacob Nevins
9090c1bb69 Discourage SSH-1 in documentation. 2014-11-08 18:38:33 +00:00