summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ssh.c
AgeCommit message (Collapse)Author
2021-09-02ssh: use RSA/SHA-256 instead of RSA/SHA-1 as the public key algorithmkemal
openssh now disables RSA/SHA-1 by default, so using RSA/SHA-1 will eventually cause us problems: https://undeadly.org/cgi?action=article;sid=20210830113413 in addition, github will disable RSA/SHA-1 for recently added RSA keys: https://github.blog/2021-09-01-improving-git-protocol-security-github/ this patch modifies ssh.c to use RSA/SHA-256 (aka rsa-sha2-256) instead of RSA/SHA-1 (aka ssh-rsa) as the public key algorithm. NOTE: public rsa keys and thumbprints are ***NOT AFFECTED*** by this patch. while we're here, remove the workaround for github.com. it seems that github has fixed their implementation, and does not look into macalgs when we're using an aead cipher. ---
2021-07-21ssh: fix typo (thanks izaki)Jacob Moody
2021-06-26vt, ssh: don't send interrupts on window resizeOri Bernstein
When resizing windows, vt would signal ssh by updating the window size and sending an interrupt. Ssh reacted by forwarding both the winch and an interrupt. This change adds a WINCH generation counter so that ssh can differentiate between resizes and interrupts. If an interrupt comes in, and the WINCH generation changes, then the interrupt is taken as signalling a WINCH.
2021-06-20libsec: move zero check to curve25519_dh_finish()cinap_lenrek
As checking for all zero has to be done in a timing-safe way to avoid a side channel, it is best todo this here instead of letting the caller deal with it. This adds a return type of int to curve25519_dh_finish() where returning 0 means we got a all zero shared key. RFC7748 states: The check for the all-zero value results from the fact that the X25519 function produces that value if it operates on an input corresponding to a point with small order, where the order divides the cofactor of the curve.
2019-05-27ssh: work around github.com's broken cipher negotiation code (thanks Ori_B)cinap_lenrek
key exchange with git@github.com fails as they appear to try to negotiate a mac algorithm even tho we use an AEAD cipher which does not use a mac algorithm. the work around is to supply a dummy mac algorithm that they can negotiate to make them happy.
2019-04-02ssh: print usage for unknown flags, cleanupcinap_lenrek
2019-04-02ssh: add experimental mux modecinap_lenrek
in mux mode, ssh relays raw MSG_CHANNEL_* messages on standard input and output while still handling authentication and key exchange internally. the intend is to use the mux mode to implement something like the old sshnet ontop of ssh.
2019-04-02ssh: implement -W option for making remote tcp connectionscinap_lenrek
2019-02-25ssh: don't assume error messages are ASCII. format number of complete runes, ↵cinap_lenrek
not bytes.
2018-11-08ssh: handle unknown MSG_CHANNE_REQUEST messagescinap_lenrek
2018-11-08ssh: handle MSG_GOBAL_REQUESTcinap_lenrek
respond to MSG_GLOBAL_REQUEST with MSG_REQUEST_FAILURE as stated by rfc4254 when server wants a reply. failing todo so breaks some proprietary keep-alive schemes.
2018-10-12ssh: fix spinning due to sticky intr flag on connection timeoutcinap_lenrek
2018-07-18ssh: fix nil dereference when TERM isnt set and -r is requestedcinap_lenrek
2018-06-28ssh: wait for remote channel close (thanks piroko)cinap_lenrek
2018-05-18ssh:add -r for extra raw modespew
2017-10-06ssh: remove extern declarations for pkcs1padbuf() and asn1encodedigest() ↵cinap_lenrek
(now in libsec.h)
2017-08-20ssh: issue "winchon" ctl request to /dev/consctl to get interrupt on window ↵cinap_lenrek
size change from vt(1)
2017-05-05ssh: add -h flag to pass host (for compatibility)cinap_lenrek
2017-05-03ssh: quote cmd arguments with unix shell single quotes, request tty even ↵cinap_lenrek
with TERM=dumb
2017-04-28ssh: add support for subsystemsaiju
2017-04-24ssh: make number of retries configurableaiju
2017-04-24ssh: loop keyboard-interactive on failureaiju
2017-04-24ssh: fix typoaiju
2017-04-24ssh: add "none" method to find out list of acceptable methodsaiju
2017-04-24ssh: print the whole ssh-rsa hostkey in base64 when thumb check failscinap_lenrek
in addition to the thumbprint, also print the whole hostkey in base64 (same format as openssh uses) to make verification easier.
2017-04-23libsec: sha256 support for thumbprint files, use it in ssh as wellcinap_lenrek
initThumbprints() now takes an application tag argument so x509 and ssh can coexist. the thumbprint entries can now hold both sha1 and sha256 hashes. okThumbprint() now takes a len argument for the hash length used. the new function okCertificate() hashes the certificate with both and checks for any matches. on failure, okCertificate() returns 0 and sets error string. we also check for include loops now in thumbfiles, limiting the number of includes to 8.
2017-04-23ssh: implement primitive hostkey verificationcinap_lenrek
this checks $home/lib/sshthumbs for the sha256 hash of the hosts rsa public key. if its not there, it prints the rc command to add it and exits.
2017-04-21ssh: actually handle flow control and channel id'scinap_lenrek
2017-04-21ssh: increase initial window size for better throughputcinap_lenrek
2017-04-21ssh: cleanup debug messagescinap_lenrek
2017-04-20ssh: do not try authentication methods that we know are not possiblecinap_lenrek
2017-04-20ssh: implement password and keyboard-interactive authentication methodscinap_lenrek
2017-04-19ssh: fix locking, and key reexchange handlingcinap_lenrek
when we initiate re-key exchange we data packets can still come in. so instead we have everything that can come in all the time in dispatch() function (including KEXINIT) and have the receiver process just call that in a loop. exclude dispatch and the sender proc from corrupting each others sendpkt() calls with the QLock sl.
2017-04-18ssh: close the channel when vt hangs upcinap_lenrek
2017-04-17ssh: weekend projectcinap_lenrek
manpage should follow...