<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go-x-crypto/ssh/example_test.go, branch ssh-run-with-context</title>
<subtitle>Fork of golang.org/x/crypto with my patches.</subtitle>
<id>http://git.kilabit.info/go-x-crypto/atom?h=ssh-run-with-context</id>
<link rel='self' href='http://git.kilabit.info/go-x-crypto/atom?h=ssh-run-with-context'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/'/>
<updated>2023-11-09T17:49:15Z</updated>
<entry>
<title>ssh: eliminate some goroutine leaks in tests and examples</title>
<updated>2023-11-09T17:49:15Z</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-11-09T14:23:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=ff15cd57d18f87d81a83bf288597042b2e50aaef'/>
<id>urn:sha1:ff15cd57d18f87d81a83bf288597042b2e50aaef</id>
<content type='text'>
This should fix the "Log in goroutine" panic seen in
https://build.golang.org/log/e42bf69fc002113dbccfe602a6c67fd52e8f31df,
as well as a few other related leaks. It also helps to verify that
none of the functions under test deadlock unexpectedly.

See https://go.dev/wiki/CodeReviewComments#goroutine-lifetimes.

Updates golang/go#58901.

Change-Id: Ica943444db381ae1accb80b101ea646e28ebf4f9
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/541095
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Nicola Murino &lt;nicola.murino@gmail.com&gt;
Reviewed-by: Heschi Kreinick &lt;heschi@google.com&gt;
</content>
</entry>
<entry>
<title>ssh: add MultiAlgorithmSigner</title>
<updated>2023-09-20T18:10:30Z</updated>
<author>
<name>Nicola Murino</name>
<email>nicola.murino@gmail.com</email>
</author>
<published>2023-07-08T13:39:11Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=28c53ff63c09fc7df7793600caa30989bc69e194'/>
<id>urn:sha1:28c53ff63c09fc7df7793600caa30989bc69e194</id>
<content type='text'>
MultiAlgorithmSigner allows to restrict client-side, server-side and
certificate signing algorithms.

Fixes golang/go#52132
Fixes golang/go#36261

Change-Id: I295092f1bba647327aaaf294f110e9157d294159
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/508398
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
Run-TryBot: Filippo Valsorda &lt;filippo@golang.org&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Auto-Submit: Filippo Valsorda &lt;filippo@golang.org&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Matthew Dempsky &lt;mdempsky@google.com&gt;
</content>
</entry>
<entry>
<title>all: replace io/ioutil with io and os package</title>
<updated>2022-09-19T17:36:07Z</updated>
<author>
<name>cui fliter</name>
<email>imcusg@gmail.com</email>
</author>
<published>2022-09-16T09:30:45Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=35f4265a4bc0c3c52524765c293aced1e60f06b7'/>
<id>urn:sha1:35f4265a4bc0c3c52524765c293aced1e60f06b7</id>
<content type='text'>
For golang/go#45557

Change-Id: I447530cc66896aef7a8d528ccb8d095b80e3cf47
GitHub-Last-Rev: 5f385ff46487ac318bd1147cdbbd26bb0ffd0426
GitHub-Pull-Request: golang/crypto#230
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/430797
Auto-Submit: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
Reviewed-by: Meng Zhuo &lt;mzh@golangcn.org&gt;
Run-TryBot: Ian Lance Taylor &lt;iant@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
<entry>
<title>crypto/ssh: add Client.Close in Dial example</title>
<updated>2020-10-12T17:37:05Z</updated>
<author>
<name>Emmanuel T Odeke</name>
<email>emmanuel@orijtech.com</email>
</author>
<published>2020-10-12T04:24:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=84dcc777aaee85807c99afb056f496a3a8b3d8de'/>
<id>urn:sha1:84dcc777aaee85807c99afb056f496a3a8b3d8de</id>
<content type='text'>
Fixes golang/go#41906

Change-Id: I2eee82160a4450f531f11d5ba7bd6ed19c019992
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/261417
Run-TryBot: Emmanuel Odeke &lt;emm.odeke@gmail.com&gt;
TryBot-Result: Go Bot &lt;gobot@golang.org&gt;
Reviewed-by: Roland Shoemaker &lt;roland@golang.org&gt;
Reviewed-by: Kevin Burke &lt;kev@inburke.com&gt;
Trust: Roland Shoemaker &lt;roland@golang.org&gt;
</content>
</entry>
<entry>
<title>ssh: rename ExampleHostKeyCheck to ExampleClientConfig_HostKeyCallback</title>
<updated>2019-04-11T14:11:56Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2019-04-11T07:04:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=d99183c9a7b6d41bb2fa77e63938f49523fe9b68'/>
<id>urn:sha1:d99183c9a7b6d41bb2fa77e63938f49523fe9b68</id>
<content type='text'>
Change-Id: I6d0f3396f06871286e3d48ec5af38770663dbed2
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/171678
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>ssh: clarify intended use of Permissions.</title>
<updated>2017-06-19T17:21:03Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2017-06-12T08:48:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=2ad6eb5ede58ae56b1ad87d91bcd2e5e88109b1d'/>
<id>urn:sha1:2ad6eb5ede58ae56b1ad87d91bcd2e5e88109b1d</id>
<content type='text'>
The Permissions struct should be used to pass information from
authentication callback to server application.

Fixes golang/go#20094.

Change-Id: I5542b657d053452327260707a24925286546bfdd
Reviewed-on: https://go-review.googlesource.com/45311
Run-TryBot: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>ssh: require host key checking in the ClientConfig</title>
<updated>2017-03-30T15:57:35Z</updated>
<author>
<name>Han-Wen Nienhuys</name>
<email>hanwen@google.com</email>
</author>
<published>2017-03-29T17:21:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=e4e2799dd7aab89f583e1d898300d96367750991'/>
<id>urn:sha1:e4e2799dd7aab89f583e1d898300d96367750991</id>
<content type='text'>
This change breaks existing behavior.

Before, a missing ClientConfig.HostKeyCallback would cause host key
checking to be disabled. In this configuration, establishing a
connection to any host just works, so today, most SSH client code in
the wild does not perform any host key checks.

This makes it easy to perform a MITM attack:

* SSH installations that use keyboard-interactive or password
authentication can be attacked with MITM, thereby stealing
passwords.

* Clients that use public-key authentication with agent forwarding are
also vulnerable: the MITM server could allow the login to succeed, and
then immediately ask the agent to authenticate the login to the real
server.

* Clients that use public-key authentication without agent forwarding
are harder to attack unnoticedly: an attacker cannot authenticate the
login to the real server, so it cannot in general present a convincing
server to the victim.

Now, a missing HostKeyCallback will cause the handshake to fail. This
change also provides InsecureIgnoreHostKey() and FixedHostKey(key) as
ready made host checkers.

A simplistic parser for OpenSSH's known_hosts file is given as an
example.  This change does not provide a full-fledged parser, as it
has complexity (wildcards, revocation, hashed addresses) that will
need further consideration.

When introduced, the host checking feature maintained backward
compatibility at the expense of security. We have decided this is not
the right tradeoff for the SSH library.

Fixes golang/go#19767

Change-Id: I45fc7ba9bd1ea29c31ec23f115cdbab99913e814
Reviewed-on: https://go-review.googlesource.com/38701
Run-TryBot: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
Reviewed-by: Brad Fitzpatrick &lt;bradfitz@golang.org&gt;
</content>
</entry>
<entry>
<title>ssh: fix height/width order in RequestPty example</title>
<updated>2016-10-04T13:31:33Z</updated>
<author>
<name>Henrik Hodne</name>
<email>henrik@hodne.io</email>
</author>
<published>2016-01-05T20:55:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=2cbd8ea802d1adf67a6ef1df6b9ade342c37241d'/>
<id>urn:sha1:2cbd8ea802d1adf67a6ef1df6b9ade342c37241d</id>
<content type='text'>
The RequestPty function takes the size arguments in the order height,
then width, instead of the more common width, then height. 80 is a very
common width for a terminal, so when the example reads RequestPty(...,
80, 40, ...), it's easy to assume that the order is width-height.
Switching the order should make it more obvious what is going on.

Change-Id: I1d6266b1c0dcde5ee6e31a6d26d2dcaf14fec58a
Reviewed-on: https://go-review.googlesource.com/18290
Run-TryBot: Russ Cox &lt;rsc@golang.org&gt;
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
<entry>
<title>x/crypto/ssh: public key authentication example</title>
<updated>2016-10-04T08:23:14Z</updated>
<author>
<name>Emmanuel Odeke</name>
<email>emm.odeke@gmail.com</email>
</author>
<published>2016-09-18T08:01:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=bde08f269ed27dc9a9c105465110825e04ab3d41'/>
<id>urn:sha1:bde08f269ed27dc9a9c105465110825e04ab3d41</id>
<content type='text'>
Fixes golang/go#13902.

Adds public key authentication to the
password authentication example.

Change-Id: I4af0ca627fb15b617cc1ba1c6e0954b013f4d94f
Reviewed-on: https://go-review.googlesource.com/29374
Reviewed-by: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
Run-TryBot: Han-Wen Nienhuys &lt;hanwen@google.com&gt;
TryBot-Result: Gobot Gobot &lt;gobot@golang.org&gt;
</content>
</entry>
<entry>
<title>ssh: Consistent error handling in examples</title>
<updated>2016-10-03T20:11:20Z</updated>
<author>
<name>Mike Houston</name>
<email>mike@kothar.net</email>
</author>
<published>2015-11-08T16:19:38Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-crypto/commit/?id=484eb34681af59703e639b971bc307019182c41f'/>
<id>urn:sha1:484eb34681af59703e639b971bc307019182c41f</id>
<content type='text'>
After discussion around an example SFTP implementation:
https://github.com/pkg/sftp/pull/54
it has been suggested that errors should be handled using
log.Fatal rather than panic, and that the actual underlying error
should also be logged. In the existing SSH examples there
are several different styles of error handling using both panic
and log.Fatalf.

This patch uses log.Fatal consistently for all of these cases.

Change-Id: I2cebfae1821530dc3c5bbc46d451fe026bed582f
Reviewed-on: https://go-review.googlesource.com/16736
Reviewed-by: Russ Cox &lt;rsc@golang.org&gt;
</content>
</entry>
</feed>
