summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correct historical comment: provos@ modified OpenSSH to work with SSLeaydtucker2020-06-051-2/+2
| | | | | (very quickly replaced by OpenSSL) not SSL in general. ok deraadt, historical context markus@
* Allow some keywords to expand shell-style ${ENV} environmentdtucker2020-05-291-7/+33
| | | | | | | | variables on the client side. The supported keywords are CertificateFile, ControlPath, IdentityAgent and IdentityFile, plus LocalForward and RemoteForward when used for Unix domain socket paths. This would for example allow forwarding of Unix domain socket paths that change at runtime. bz#3140, ok djm@
* Add TOKEN percent expansion to LocalFoward and RemoteForward when useddtucker2020-04-101-50/+87
| | | | | | for Unix domain socket forwarding. Factor out the code for the config keywords that use the most common subset of TOKENS into its own function. bz#3014, ok jmc@ (man page bits) djm@
* r1.522 deleted one too many lines; repairdjm2020-04-031-1/+2
|
* fix debug statementdjm2020-04-031-2/+2
|
* the tunnel-forwarding vs ExitOnForwardFailure fix that I committeddjm2020-04-031-3/+14
| | | | | earlier had an off-by-one. Fix this and add some debugging that would have made it apparent sooner.
* make failures when establishing "Tunnel" forwarding terminate thedjm2020-04-031-23/+39
| | | | connection when ExitOnForwardFailure is enabled; bz3116; ok dtucker
* Make with config keywords support which percent_expansions more consistent.dtucker2020-04-031-67/+53
| | | | | | | | | | | - %C is moved into its own function and added to Match Exec. - move the common (global) options into a macro. This is ugly but it's the least-ugly way I could come up with. - move IdentityAgent and ForwardAgent percent expansion to before the config dump to make it regression-testable. - document all of the above ok jmc@ for man page bits, "makes things less terrible" djm@ for the rest.
* initialize cname in case ai_canonname is NULL or too long; ok djmmarkus2020-03-061-2/+3
|
* Detect and prevent simple configuration loops when using ProxyJump.dtucker2020-02-181-1/+9
| | | | bz#3057, ok djm@
* Add ssh -Q key-sig for all key and signature types. Teach ssh -Q to acceptdtucker2020-02-071-5/+14
| | | | | ssh_config(5) and sshd_config(5) algorithm keywords as an alias for the corresponding query. Man page help jmc@, ok djm@.
* Replace "security key" with "authenticator" in program messages.naddy2020-02-061-2/+2
| | | | | | | This replaces "security key" in error/usage/verbose messages and distinguishes between "authenticator" and "authenticator-hosted key". ok djm@
* disable UpdateHostKeys=ask when in quiet mode;djm2020-01-281-1/+4
| | | | "work for me" matthieu@
* disable UpdateHostKeys=ask if command is specified; ok djm@ sthen@markus2020-01-271-6/+13
|
* allow UpdateKnownHosts=yes to function when multiple known_hosts filesdjm2020-01-251-2/+2
| | | | | | | | are in use. When updating host keys, ssh will now search subsequent known_hosts files, but will add new/changed host keys to the first specified file only. bz#2738 ok markus@
* expose PKCS#11 key labels/X.509 subjects as commentsdjm2020-01-251-5/+7
| | | | | | | | | | | Extract the key label or X.509 subject string when PKCS#11 keys are retrieved from the token and plumb this through to places where it may be used as a comment. based on https://github.com/openssh/openssh-portable/pull/138 by Danielle Church feedback and ok markus@
* Make zlib optional. This adds a "ZLIB" build time option that allowsdtucker2020-01-231-4/+15
| | | | | building without zlib compression and associated options. With feedback from markus@, ok djm@
* Replace all calls to signal(2) with a wrapper around sigaction(2).dtucker2020-01-231-3/+3
| | | | | | This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations.
* fix CanonicalizeHostname, broken by rev 1.507beck2020-01-051-2/+2
| | | | | Issue noticed and reported by Pierre-Olivier Martel <pom@apple.com> ok dtucker@ markus@ djm@
* Allow forwarding a different agent socket to the path specified bydjm2019-12-211-1/+33
| | | | | | | | $SSH_AUTH_SOCK, by extending the existing ForwardAgent option to accepting an explicit path or the name of an environment variable in addition to yes/no. Patch by Eric Chiang, manpage by me; ok markus@
* additional missing stdarg.h includes when built without WITH_OPENSSL; ok djm@naddy2019-11-181-1/+2
|
* ssh client support for U2F/FIDO keysdjm2019-10-311-1/+17
|
* allow %n to be expanded in ProxyCommand stringsdjm2019-09-131-2/+2
| | | | | From Zachary Harmany via github.com/openssh/openssh-portable/pull/118 ok dtucker@
* Allow prepending a list of algorithms to the default set by startingnaddy2019-09-061-2/+2
| | | | | | | | | the list with the '^' character, e.g. HostKeyAlgorithms ^ssh-ed25519 Ciphers ^aes128-gcm@openssh.com,aes256-gcm@openssh.com ok djm@ dtucker@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-10/+10
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* slightly more instructive error message when the user specifies multipledjm2019-06-141-3/+6
| | | | -J options on the commandline. bz3015 ok dtucker@
* Hostname->HostName cleanup; from lauri tirkkonenjmc2019-06-121-2/+2
| | | | ok dtucker
* Replace calls to ssh_malloc_init() by a static init of malloc_options.otto2019-06-061-2/+1
| | | | Prepares for changes in the way malloc is initialized. ok guenther@ dtucker@
* Use the LogLevel typdef instead of int where appropriate. Patch fromdtucker2019-04-231-2/+3
| | | | Markus Schmidt via openssh-unix-dev, ok markus@
* remove last references to active_statedjm2019-01-191-4/+1
| | | | with & ok markus@
* convert ssh.c to new packet APIdjm2019-01-191-26/+41
| | | | with & ok markus@
* begin landing remaining refactoring of packet parsing API, starteddjm2019-01-191-1/+4
| | | | | | | | | | | almost exactly six years ago. This change stops including the old packet_* API by default and makes each file that requires the old API include it explicitly. We will commit file-by-file refactoring to remove the old API in consistent steps. with & ok markus@
* move client/server SSH-* banners to buffers under ssh->kex and factordjm2018-12-271-2/+2
| | | | | | | | | | | out the banner exchange. This eliminates some common code from the client and server. Also be more strict about handling \r characters - these should only be accepted immediately before \n (pointed out by Jann Horn). Inspired by a patch from Markus Schmidt. (lots of) feedback and ok markus@
* add a ssh_config "Match final" predicatedjm2018-11-231-11/+20
| | | | | Matches in same pass as "Match canonical" but doesn't require hostname canonicalisation be enabled. bz#2906 ok markus
* refer to OpenSSL not SSLeay;djm2018-10-231-3/+3
| | | | we're old, but we don't have to act it
* Allow ssh_config IdentityAgent directive to accept environment variabledjm2018-10-031-3/+21
| | | | names as well as explicit paths. ok dtucker@
* Treat connections with ProxyJump specified the same as ones with adjm2018-09-211-4/+3
| | | | | | | | ProxyCommand set with regards to hostname canonicalisation (i.e. don't try to canonicalise the hostname unless CanonicalizeHostname is set to 'always'). Patch from Sven Wegener via bz#2896
* fix "ssh -Q sig" to show correct signature algorithm list (it wasdjm2018-09-201-2/+2
| | | | erroneously showing certificate algorithms); prompted by markus@
* Add "ssh -Q sig" to allow listing supported signature algorithmsdjm2018-09-121-2/+9
| | | | ok markus@
* Now that ssh can't be setuid, remove the original_real_uid anddtucker2018-07-271-22/+9
| | | | | original_effective_uid globals and replace with calls to plain getuid(). ok djm@
* Use the caller provided (copied) pwent struct in load_public_identity_filesbeck2018-07-251-3/+1
| | | | | | | | instead of calling getpwuid() again and discarding the argument. This prevents a client crash where tilde_expand_filename calls getpwuid() again before the pwent pointer is used. Issue noticed and reported by Pierre-Olivier Martel <pom@apple.com> ok djm@ deraadt@
* Deprecate UsePrivilegedPort now that support for running ssh(1)dtucker2018-07-191-7/+2
| | | | | | | | | | | setuid has been removed, remove supporting code and clean up references to it in the man pages We have not shipped ssh(1) the setuid bit since 2002. If ayone really needs to make connections from a low port number this can be implemented via a small setuid ProxyCommand. ok markus@ jmc@ djm@
* Remove support for running ssh(1) setuid and fatal if attempted.dtucker2018-07-181-33/+7
| | | | | Do not link uidwap.c into ssh any more. Neuters UsePrivilegedPort, which will be marked as deprecated shortly. ok markus@ djm@
* Slot 0 in the hostbased key array was previously RSA1, but that isdtucker2018-07-161-22/+22
| | | | | | | now gone and the slot is unused so remove it. Remove two now-unused macros, and add an array bounds check to the two remaining ones (array is statically sized, so mostly a safety check on future changes). ok markus@
* Remove support for loading HostBasedAuthentication keys directly indtucker2018-07-161-30/+5
| | | | | ssh(1) and always use ssh-keysign. This removes one of the few remaining reasons why ssh(1) might be setuid. ok markus@
* keep options.identity_file_userprovided array in sync when we loaddjm2018-07-161-2/+18
| | | | keys, fixing some spurious error messages; ok markus
* remove legacy key emulation layer; ok djm@markus2018-07-111-57/+78
|
* client: switch to sshbuf API; ok djm@markus2018-07-091-13/+16
|
* fix incorrect expansion of %i in load_public_identity_files(); reported bydjm2018-06-081-2/+2
| | | | Roumen Petrov
* Add a PermitListen directive to control which server-side addressesdjm2018-06-061-3/+3
| | | | | | | | | may be listened on when the client requests remote forwarding (ssh -R). This is the converse of the existing PermitOpen directive and this includes some refactoring to share much of its implementation. feedback and ok markus@