summaryrefslogtreecommitdiff
path: root/sshconnect.c
Commit message (Collapse)AuthorAgeFilesLines
* - djm@cvs.openbsd.org 2014/04/01 03:34:10Damien Miller2014-04-201-17/+27
| | | | | | | | | | | [sshconnect.c] When using VerifyHostKeyDNS with a DNSSEC resolver, down-convert any certificate keys to plain keys and attempt SSHFP resolution. Prevents a server from skipping SSHFP lookup and forcing a new-hostkey dialog by offering only certificate keys. Reported by mcv21 AT cam.ac.uk
* - djm@cvs.openbsd.org 2014/02/06 22:21:01Damien Miller2014-02-071-15/+18
| | | | | | | [sshconnect.c] in ssh_create_socket(), only do the getaddrinfo for BindAddress when BindAddress is actually specified. Fixes regression in 6.5 for UsePrivilegedPort=yes; patch from Corinna Vinschen
* - djm@cvs.openbsd.org 2014/02/02 03:44:32Damien Miller2014-02-041-2/+2
| | | | | | | | | | | [auth1.c auth2-chall.c auth2-passwd.c authfile.c bufaux.c bufbn.c] [buffer.c cipher-3des1.c cipher.c clientloop.c gss-serv.c kex.c] [kexdhc.c kexdhs.c kexecdhc.c kexgexc.c kexecdhs.c kexgexs.c key.c] [monitor.c monitor_wrap.c packet.c readpass.c rsa.c serverloop.c] [ssh-add.c ssh-agent.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c] [ssh-keygen.c ssh-rsa.c sshconnect.c sshconnect1.c sshconnect2.c] [sshd.c] convert memset of potentially-private data to explicit_bzero()
* - djm@cvs.openbsd.org 2014/01/09 23:26:48Damien Miller2014-01-101-1/+4
| | | | | | [sshconnect.c sshd.c] ban clients/servers that suffer from SSH_BUG_DERIVEKEY, they are ancient, deranged and might make some attacks on KEX easier; ok markus@
* - djm@cvs.openbsd.org 2013/12/30 23:52:28Damien Miller2013-12-311-1/+4
| | | | | | | | | [auth2-hostbased.c auth2-pubkey.c compat.c compat.h ssh-rsa.c] [sshconnect.c sshconnect2.c sshd.c] refuse RSA keys from old proprietary clients/servers that use the obsolete RSA+MD5 signature scheme. it will still be possible to connect with these clients/servers but only DSA keys will be accepted, and we'll deprecate them entirely in a future release. ok markus@
* - djm@cvs.openbsd.org 2013/12/29 05:57:02Damien Miller2013-12-291-2/+9
| | | | | [sshconnect.c] when showing other hostkeys, don't forget Ed25519 keys
* - djm@cvs.openbsd.org 2013/10/16 02:31:47Damien Miller2013-10-171-45/+29
| | | | | | | | | | | | [readconf.c readconf.h roaming_client.c ssh.1 ssh.c ssh_config.5] [sshconnect.c sshconnect.h] Implement client-side hostname canonicalisation to allow an explicit search path of domain suffixes to use to convert unqualified host names to fully-qualified ones for host key matching. This is particularly useful for host certificates, which would otherwise need to list unqualified names alongside fully-qualified ones (and this causes a number of problems). "looks fine" markus@
* - djm@cvs.openbsd.org 2013/09/19 01:26:29Darren Tucker2013-10-101-25/+26
| | | | | | [sshconnect.c] bz#1211: make BindAddress work with UsePrivilegedPort=yes; patch from swp AT swp.pp.ru; ok dtucker@
* - djm@cvs.openbsd.org 2013/08/20 00:11:38Damien Miller2013-08-211-18/+106
| | | | | | | | | | [readconf.c readconf.h ssh_config.5 sshconnect.c] Add a ssh_config ProxyUseFDPass option that supports the use of ProxyCommands that establish a connection and then pass a connected file descriptor back to ssh(1). This allows the ProxyCommand to exit rather than have to shuffle data back and forth and enables ssh to use getpeername, etc. to obtain address information just like it does with regular directly-connected sockets. ok markus@
* - djm@cvs.openbsd.org 2013/05/17 00:13:13Darren Tucker2013-06-021-21/+20
| | | | | | | | | | | | | | | | | | [xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c dns.c packet.c readpass.c authfd.c moduli.c] bye, bye xfree(); ok markus@
* - markus@cvs.openbsd.org 2013/02/22 19:13:56Darren Tucker2013-04-051-1/+8
| | | | | [sshconnect.c] support ProxyCommand=- (stdin/out already point to the proxy); ok djm@
* - markus@cvs.openbsd.org 2012/09/14 16:51:34Darren Tucker2012-09-171-3/+1
| | | | | [sshconnect.c] remove unused variable
* - djm@cvs.openbsd.org 2012/08/17 01:30:00Darren Tucker2012-09-061-13/+34
| | | | | | | [compat.c sshconnect.c] Send client banner immediately, rather than waiting for the server to move first for SSH protocol 2 connections (the default). Patch based on one in bz#1999 by tls AT panix.com, feedback dtucker@ ok markus@
* - djm@cvs.openbsd.org 2011/05/24 07:15:47Damien Miller2011-05-291-36/+36
| | | | | | | | [readconf.c readconf.h ssh.c ssh_config.5 sshconnect.c sshconnect2.c] Remove undocumented legacy options UserKnownHostsFile2 and GlobalKnownHostsFile2 by making UserKnownHostsFile/GlobalKnownHostsFile accept multiple paths per line and making their defaults include known_hosts2; ok markus
* - djm@cvs.openbsd.org 2011/05/23 03:52:55Damien Miller2011-05-291-2/+1
| | | | | [sshconnect.c] remove extra newline
* - djm@cvs.openbsd.org 2011/01/16 11:50:36Damien Miller2011-01-161-1/+3
| | | | | | [sshconnect.c] reset the SIGPIPE handler when forking to execute child processes; ok dtucker@
* - djm@cvs.openbsd.org 2011/01/06 23:01:35Damien Miller2011-01-071-1/+4
| | | | | | [sshconnect.c] reset SIGCHLD handler to SIG_DFL when execuring LocalCommand; ok markus@
* - markus@cvs.openbsd.org 2010/12/14 11:59:06Damien Miller2011-01-061-4/+3
| | | | | | [sshconnect.c] don't mention key type in key-changed-warning, since we also print this warning if a new key type appears. ok djm@
* - djm@cvs.openbsd.org 2010/11/29 23:45:51Damien Miller2010-12-011-138/+153
| | | | | | | | | [auth.c hostfile.c hostfile.h ssh.c ssh_config.5 sshconnect.c] [sshconnect.h sshconnect2.c] automatically order the hostkeys requested by the client based on which hostkeys are already recorded in known_hosts. This avoids hostkey warnings when connecting to servers with new ECDSA keys that are preferred by default; with markus@
* - (djm) [sshconnect.c] Need signal.h for prototype for kill(2)Damien Miller2010-10-121-0/+1
|
* - djm@cvs.openbsd.org 2010/10/06 21:10:21Damien Miller2010-10-071-2/+2
| | | | | [sshconnect.c] swapped args to kill(2)
* - djm@cvs.openbsd.org 2010/10/06 06:39:28Damien Miller2010-10-071-2/+14
| | | | | | [clientloop.c ssh.c sshconnect.c sshconnect.h] kill proxy command on fatal() (we already kill it on clean exit); ok markus@
* - djm@cvs.openbsd.org 2010/10/05 05:13:18Damien Miller2010-10-071-3/+3
| | | | | [sftp.c sshconnect.c] use default shell /bin/sh if $SHELL is ""; ok markus@
* - djm@cvs.openbsd.org 2010/08/31 11:54:45Damien Miller2010-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys auth2-jpake.c authfd.c] [authfile.c buffer.h dns.c kex.c kex.h key.c key.h monitor.c] [monitor_wrap.c myproposal.h packet.c packet.h pathnames.h readconf.c] [ssh-add.1 ssh-add.c ssh-agent.1 ssh-agent.c ssh-keygen.1 ssh-keygen.c] [ssh-keyscan.1 ssh-keyscan.c ssh-keysign.8 ssh.1 ssh.c ssh2.h] [ssh_config.5 sshconnect.c sshconnect2.c sshd.8 sshd.c sshd_config.5] [uuencode.c uuencode.h bufec.c kexecdh.c kexecdhc.c kexecdhs.c ssh-ecdsa.c] Implement Elliptic Curve Cryptography modes for key exchange (ECDH) and host/user keys (ECDSA) as specified by RFC5656. ECDH and ECDSA offer better performance than plain DH and DSA at the same equivalent symmetric key length, as well as much shorter keys. Only the mandatory sections of RFC5656 are implemented, specifically the three REQUIRED curves nistp256, nistp384 and nistp521 and only ECDH and ECDSA. Point compression (optional in RFC5656 is NOT implemented). Certificate host and user keys using the new ECDSA key types are supported. Note that this code has not been tested for interoperability and may be subject to change. feedback and ok markus@
* - djm@cvs.openbsd.org 2010/04/16 21:14:27Damien Miller2010-04-181-2/+2
| | | | | [sshconnect.c] oops, %r => remote username, not %u
* - djm@cvs.openbsd.org 2010/04/16 01:47:26Damien Miller2010-04-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | [PROTOCOL.certkeys auth-options.c auth-options.h auth-rsa.c] [auth2-pubkey.c authfd.c key.c key.h myproposal.h ssh-add.c] [ssh-agent.c ssh-dss.c ssh-keygen.1 ssh-keygen.c ssh-rsa.c] [sshconnect.c sshconnect2.c sshd.c] revised certificate format ssh-{dss,rsa}-cert-v01@openssh.com with the following changes: move the nonce field to the beginning of the certificate where it can better protect against chosen-prefix attacks on the signature hash Rename "constraints" field to "critical options" Add a new non-critical "extensions" field Add a serial number The older format is still support for authentication and cert generation (use "ssh-keygen -t v00 -s ca_key ..." to generate a v00 certificate) ok markus@
* - djm@cvs.openbsd.org 2010/04/14 22:27:42Damien Miller2010-04-161-3/+3
| | | | | | [ssh_config.5 sshconnect.c] expand %r => remote username in ssh_config:ProxyCommand; ok deraadt markus
* - djm@cvs.openbsd.org 2010/04/10 00:04:30Damien Miller2010-04-161-2/+2
| | | | | | [sshconnect.c] fix terminology: we didn't find a certificate in known_hosts, we found a CA key
* - djm@cvs.openbsd.org 2010/03/04 10:36:03Damien Miller2010-03-041-2/+22
| | | | | | | | | | | | | | | [auth-rh-rsa.c auth-rsa.c auth.c auth.h auth2-hostbased.c auth2-pubkey.c] [authfile.c authfile.h hostfile.c hostfile.h servconf.c servconf.h] [ssh-keygen.c ssh.1 sshconnect.c sshd_config.5] Add a TrustedUserCAKeys option to sshd_config to specify CA keys that are trusted to authenticate users (in addition than doing it per-user in authorized_keys). Add a RevokedKeys option to sshd_config and a @revoked marker to known_hosts to allow keys to me revoked and banned for user or host authentication. feedback and ok markus@
* - OpenBSD CVS SyncDamien Miller2010-02-271-13/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - djm@cvs.openbsd.org 2010/02/26 20:29:54 [PROTOCOL PROTOCOL.agent PROTOCOL.certkeys addrmatch.c auth-options.c] [auth-options.h auth.h auth2-pubkey.c authfd.c dns.c dns.h hostfile.c] [hostfile.h kex.h kexdhs.c kexgexs.c key.c key.h match.h monitor.c] [myproposal.h servconf.c servconf.h ssh-add.c ssh-agent.c ssh-dss.c] [ssh-keygen.1 ssh-keygen.c ssh-rsa.c ssh.1 ssh.c ssh2.h sshconnect.c] [sshconnect2.c sshd.8 sshd.c sshd_config.5] Add support for certificate key types for users and hosts. OpenSSH certificate key types are not X.509 certificates, but a much simpler format that encodes a public key, identity information and some validity constraints and signs it with a CA key. CA keys are regular SSH keys. This certificate style avoids the attack surface of X.509 certificates and is very easy to deploy. Certified host keys allow automatic acceptance of new host keys when a CA certificate is marked as sh/known_hosts. see VERIFYING HOST KEYS in ssh(1) for details. Certified user keys allow authentication of users when the signing CA key is marked as trusted in authorized_keys. See "AUTHORIZED_KEYS FILE FORMAT" in sshd(8) for details. Certificates are minted using ssh-keygen(1), documentation is in the "CERTIFICATES" section of that manpage. Documentation on the format of certificates is in the file PROTOCOL.certkeys feedback and ok markus@
* - (dtucker) OpenBSD CVS SyncDarren Tucker2010-01-131-2/+2
| | | | | | - dtucker@cvs.openbsd.org 2010/01/13 00:19:04 [sshconnect.c auth.c] Fix a couple of typos/mispellings in comments
* - dtucker@cvs.openbsd.org 2010/01/09 23:04:13Darren Tucker2010-01-101-3/+2
| | | | | | | | | | | | | | | [channels.c ssh.1 servconf.c sshd_config.5 sshd.c channels.h servconf.h ssh-keyscan.1 ssh-keyscan.c readconf.c sshconnect.c misc.c ssh.c readconf.h scp.1 sftp.1 ssh_config.5 misc.h] Remove RoutingDomain from ssh since it's now not needed. It can be replaced with "route exec" or "nc -V" as a proxycommand. "route exec" also ensures that trafic such as DNS lookups stays withing the specified routingdomain. For example (from reyk): # route -T 2 exec /usr/sbin/sshd or inherited from the parent process $ route -T 2 exec sh $ ssh 10.1.2.3 ok deraadt@ markus@ stevesk@ reyk@
* - dtucker@cvs.openbsd.org 2009/11/10 04:30:45Darren Tucker2010-01-081-2/+6
| | | | | | [sshconnect2.c channels.c sshconnect.c] Set close-on-exec on various descriptors so they don't get leaked to child processes. bz #1643, patch from jchadima at redhat, ok deraadt.
* - reyk@cvs.openbsd.org 2009/10/28 16:38:18Darren Tucker2010-01-081-2/+3
| | | | | | | | [ssh_config.5 sshd.c misc.h ssh-keyscan.1 readconf.h sshconnect.c channels.c channels.h servconf.h servconf.c ssh.1 ssh-keyscan.c scp.1 sftp.1 sshd_config.5 readconf.c ssh.c misc.c] Allow to set the rdomain in ssh/sftp/scp/sshd and ssh-keyscan. ok markus@
* - andreas@cvs.openbsd.org 2009/05/28 16:50:16Darren Tucker2009-06-211-3/+5
| | | | | | | | | [sshd.c packet.c serverloop.c monitor_wrap.c clientloop.c sshconnect.c monitor.c Added roaming.h roaming_common.c roaming_dummy.c] Keep track of number of bytes read and written. Needed for upcoming changes. Most code from Martin Forssen, maf at appgate dot com. ok markus@ Also, applied appropriate changes to Makefile.in
* - andreas@cvs.openbsd.org 2009/05/28 16:50:16Darren Tucker2009-06-211-2/+2
| | | | | | | | [sshd.c packet.c serverloop.c monitor_wrap.c clientloop.c sshconnect.c monitor.c] Keep track of number of bytes read and written. Needed for upcoming changes. Most code from Martin Forssen, maf at appgate dot com. ok markus@
* - (dtucker) [defines.h sshconnect.c] INET6_ADDRSTRLEN is now needed inDarren Tucker2009-02-011-4/+0
| | | | | channels.c too, so move the definition for non-IP6 platforms to defines.h where it can be shared.
* - stevesk@cvs.openbsd.org 2008/10/14 18:11:33Damien Miller2008-11-031-3/+3
| | | | | [sshconnect.c] use #define ROQUIET here; no binary change. ok dtucker@
* - dtucker@cvs.openbsd.org 2008/07/01 07:24:22Darren Tucker2008-07-021-3/+3
| | | | | | [sshconnect.c sshd.c] Send CR LF during protocol banner exchanges, but only for Protocol 2 only, in order to comply with RFC 4253. bz #1443, ok djm@
* - dtucker@cvs.openbsd.org 2008/07/01 07:20:52Darren Tucker2008-07-021-2/+13
| | | | | | [sshconnect.c] Check ExitOnForwardFailure if forwardings are disabled due to a failed host key check. ok djm@
* - grunk@cvs.openbsd.org 2008/06/26 11:46:31Damien Miller2008-06-301-11/+7
| | | | | | | | | | [readconf.c readconf.h ssh.1 ssh_config.5 sshconnect.c] Move SSH Fingerprint Visualization away from sharing the config option CheckHostIP to an own config option named VisualHostKey. While there, fix the behaviour that ssh would draw a random art picture on every newly seen host even when the option was not enabled. prodded by deraadt@, discussions, help and ok markus@ djm@ dtucker@
* - ian@cvs.openbsd.org 2008/06/12 23:24:58Darren Tucker2008-06-131-2/+2
| | | | | [sshconnect.c] tweak wording in message, ok deraadt@ jmc@
* - dtucker@cvs.openbsd.org 2008/06/12 20:38:28Darren Tucker2008-06-131-18/+5
| | | | | | [sshd.c sshconnect.c packet.h misc.c misc.h packet.c] Make keepalive timeouts apply while waiting for a packet, particularly during key renegotiation (bz #1363). With djm and Matt Day, ok djm@
* - grunk@cvs.openbsd.org 2008/06/12 00:13:55Darren Tucker2008-06-131-2/+10
| | | | | | [sshconnect.c] Make ssh print the random art also when ssh'ing to a host using IP only. spotted by naddy@, ok and help djm@ dtucker@
* - dtucker@cvs.openbsd.org 2008/06/12 00:03:49Darren Tucker2008-06-131-2/+2
| | | | | | | | | | | | | | | [dns.c canohost.c sshconnect.c] Do not pass "0" strings as ports to getaddrinfo because the lookups can slow things down and we never use the service info anyway. bz #859, patch from YOSHIFUJI Hideaki and John Devitofranceschi. ok deraadt@ djm@ djm belives that the reason for the "0" strings is to ensure that it's not possible to call getaddrinfo with both host and port being NULL. In the case of canohost.c host is a local array. In the case of sshconnect.c, it's checked for null immediately before use. In dns.c it ultimately comes from ssh.c:main() and is guaranteed to be non-null but it's not obvious, so I added a warning message in case it is ever passed a null.
* - grunk@cvs.openbsd.org 2008/06/11 21:01:35Darren Tucker2008-06-131-7/+19
| | | | | | | | | | | | | | | | | | | | | | | [ssh_config.5 key.h readconf.c readconf.h ssh-keygen.1 ssh-keygen.c key.c sshconnect.c] Introduce SSH Fingerprint ASCII Visualization, a technique inspired by the graphical hash visualization schemes known as "random art", and by Dan Kaminsky's musings on the subject during a BlackOp talk at the 23C3 in Berlin. Scientific publication (original paper): "Hash Visualization: a New Technique to improve Real-World Security", Perrig A. and Song D., 1999, International Workshop on Cryptographic Techniques and E-Commerce (CrypTEC '99) http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf The algorithm used here is a worm crawling over a discrete plane, leaving a trace (augmenting the field) everywhere it goes. Movement is taken from dgst_raw 2bit-wise. Bumping into walls makes the respective movement vector be ignored for this turn, thus switching to the other color of the chessboard. Graphs are not unambiguous for now, because circles in graphs can be walked in either direction. discussions with several people, help, corrections and ok markus@ djm@
* - dtucker@cvs.openbsd.org 2007/12/27 14:22:08Darren Tucker2007-12-291-4/+4
| | | | | | | | [servconf.c canohost.c misc.c channels.c sshconnect.c misc.h ssh-keyscan.c sshd.c] Add a small helper function to consistently handle the EAI_SYSTEM error code of getaddrinfo. Prompted by vgiffin at apple com via bz #1417. ok markus@ stevesk@
* - djm@cvs.openbsd.org 2007/09/04 11:15:56Damien Miller2007-09-171-21/+84
| | | | | | | | | | [ssh.c sshconnect.c sshconnect.h] make ssh(1)'s ConnectTimeout option apply to both the TCP connection and SSH banner exchange (previously it just covered the TCP connection). This allows callers of ssh(1) to better detect and deal with stuck servers that accept a TCP connection but don't progress the protocol, and also makes ConnectTimeout useful for connections via a ProxyCommand; feedback and "looks ok" markus@
* - djm@cvs.openbsd.org 2007/08/23 03:23:26Damien Miller2007-09-171-3/+6
| | | | | [sshconnect.c] Execute ProxyCommands with $SHELL rather than /bin/sh unconditionally
* - markus@cvs.openbsd.org 2006/10/10 10:12:45Damien Miller2006-10-241-6/+5
| | | | | | [sshconnect.c] sleep before retrying (not after) since sleep changes errno; fixes pr 5250; rad@twig.com; ok dtucker djm