summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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@
* make UID available as a %-expansion everywhere that the username isdjm2018-06-011-8/+22
| | | | | | | available currently. In the client this is via %i, in the server %U (since %i was already used in the client in some places for this, but used for something different in the server); bz#2870, ok dtucker@
* prefer argv0 to "ssh" when re-executing ssh for ProxyJump directive;djm2018-06-011-2/+11
| | | | bz2831, feedback and ok dtucker@
* don't free the %C expansion, it's used later for LocalCommanddjm2018-04-141-2/+1
|
* lots of typos in comments/docs. Patch from Karsten Weiss after checkingdjm2018-04-101-2/+2
| | | | with codespell tool (https://github.com/lucasdemarchi/codespell)
* Add experimental support for PQC XMSS keys (Extended Hash-Based Signatures)markus2018-02-231-3/+12
| | | | | | | The code is not compiled in by default (see WITH_XMSS in Makefile.inc) Joint work with stefan-lukas_gazdag at genua.eu See https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12 ok djm@
* Add BindInterface ssh_config directive and -B command-line argumentdjm2018-02-231-9/+12
| | | | | | | | | | | to ssh(1) that directs it to bind its outgoing connection to the address of the specified network interface. BindInterface prefers to use addresses that aren't loopback or link- local, but will fall back to those if no other addresses of the required family are available on that interface. Based on patch by Mike Manning in bz#2820, ok dtucker@
* remove space before tabdjm2018-02-131-18/+18
|
* Don't reset signal handlers inside handlers.dtucker2018-02-111-3/+1
| | | | | | | | | The signal handlers from the original ssh1 code on which OpenSSH is based assume unreliable signals and reinstall their handlers. Since OpenBSD (and pretty much every current system) has reliable signals this is not needed. In the unlikely even that -portable is still being used on such systems we will deal with it in the compat layer. ok deraadt@
* Drop compatibility hacks for some ancient SSH implementations, includingdjm2018-01-231-2/+2
| | | | | | | | | | ssh.com <=2.* and OpenSSH <= 3.*. These versions were all released in or before 2001 and predate the final SSH RFCs. The hacks in question aren't necessary for RFC- compliant SSH implementations. ok markus@
* don't attempt to force hostnames that are addresses to lowercase, butdjm2018-01-231-17/+71
| | | | | | instead canonicalise them through getnameinfo/getaddrinfo to remove ambiguities (e.g. ::0001 => ::1) before they are matched against known_hosts; bz#2763, ok dtucker@
* fix broken stdout in ControlPersist mode, introduced by me in r1.467djm2017-11-011-8/+10
| | | | and reported by Alf Schlichting
* whitespace at EOLdjm2017-10-271-6/+6
|
* transfer ownership of stdout to the session channel by dup2'ingdjm2017-10-251-2/+16
| | | | | /dev/null to fd 1. This allows propagation of remote stdout close to the local side; reported by David Newall, ok markus@
* Expose devices allocated for tun/tap forwarding.djm2017-10-231-54/+54
| | | | | | | | | | | At the client, the device may be obtained from a new %T expansion for LocalCommand. At the server, the allocated devices will be listed in a SSH_TUNNEL variable exposed to the environment of any user sessions started after the tunnel forwarding was established. ok markus
* Add URI support to ssh, sftp and scp. For example ssh://user@hostmillert2017-10-211-15/+41
| | | | | | | or sftp://user@host/path. The connection parameters described in draft-ietf-secsh-scp-sftp-ssh-uri-04 are not implemented since the ssh fingerprint format in the draft uses md5 with no way to specify the hash function type. OK djm@
* Add 'reverse' dynamic forwarding which combines dynamic forwardingmarkus2017-09-211-2/+3
| | | | | | | | | | | | | | (-D) with remote forwarding (-R) where the remote-forwarded port expects SOCKS-requests. The SSH server code is unchanged and the parsing happens at the SSH clients side. Thus the full SOCKS-request is sent over the forwarded channel and the client parses c->output. Parsing happens in channel_before_prepare_select(), _before_ the select bitmask is computed in the pre[] handlers, but after network input processing in the post[] handlers. help and ok djm@
* refactor channels.cdjm2017-09-121-40/+48
| | | | | | | | | | | | | | | | | | Move static state to a "struct ssh_channels" that is allocated at runtime and tracked as a member of struct ssh. Explicitly pass "struct ssh" to all channels functions. Replace use of the legacy packet APIs in channels.c. Rework sshd_config PermitOpen handling: previously the configuration parser would call directly into the channels layer. After the refactor this is not possible, as the channels structures are allocated at connection time and aren't available when the configuration is parsed. The server config parser now tracks PermitOpen itself and explicitly configures the channels code later. ok markus@
* make "--" before the hostname terminate command-line option processingdjm2017-08-121-4/+7
| | | | | | | | completely; previous behaviour would not prevent further options appearing after the hostname (ssh has a supported options after the hostname for >20 years, so that's too late to change). ok deraadt@
* Add RemoteCommand option to specify a command in the ssh configbluhm2017-05-301-8/+32
| | | | | | | file instead of giving it on the client's command line. This command will be executed on the remote host. The feature allows to automate tasks using ssh config. OK markus@
* switch from Key typedef with struct sshkey; ok djm@markus2017-05-301-5/+5
|
* remove options -12 from usage();jmc2017-05-021-2/+2
|
* obliterate ssh1.h and some dead code that used itdjm2017-04-301-2/+1
| | | | ok markus@
* remove KEY_RSA1djm2017-04-301-3/+2
| | | | ok markus@
* remove SSHv1 ciphers; ok markus@djm2017-04-301-17/+4
|
* remove compat20/compat13/compat15 variablesdjm2017-04-301-172/+2
| | | | ok markus@
* remove options.protocol and client Protocol configuration knobdjm2017-04-301-3/+3
| | | | ok markus@