Skip to main content

max / makenotwork

mnw-cli: bump russh to 0.62 to unblock the build mnw-cli did not build at all: russh 0.58 hard-pins rand_core =0.10.0-rc-3 while synckit-client needs rand ^0.10 (stable rand_core), so cargo could not resolve a dependency graph. russh 0.62 drops the RC pin and the two now agree on rand 0.10. Two API changes came with it: channel_open_session takes a ChannelOpenHandle and returns Result<()> instead of Result<bool>. The channel is still registered before accepting, preserving the old ordering so a peer never proceeds against a channel the handler cannot find; an undropped handle rejects with AdministrativelyProhibited, so failing to accept closes the channel rather than hanging it. Host-key generation used rand_core's OsRng re-exported through russh precisely to dodge the version conflict this bump removes. rand 0.10 has no OsRng at all, so it now calls rand::rng(), the same CSPRNG russh itself uses to generate keys, with rand added as a direct dependency. 58 tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-21 13:31 UTC
Commit: 98e7254a6230f6942f46a519cf19db2ee3ef1d54
Parent: bdbff04
4 files changed, +179 insertions, -125 deletions
M mnw-cli/Cargo.lock +160 -115
@@ -19,28 +19,40 @@ dependencies = [
19 19 ]
20 20
21 21 [[package]]
22 + name = "aead"
23 + version = "0.6.1"
24 + source = "registry+https://github.com/rust-lang/crates.io-index"
25 + checksum = "1973cfbc1a2daf9cf550e74e1f088c28e7f7d8c1e1418fb6c9dc5184b7e84c99"
26 + dependencies = [
27 + "crypto-common 0.2.2",
28 + "inout 0.2.2",
29 + ]
30 +
31 + [[package]]
22 32 name = "aes"
23 - version = "0.8.4"
33 + version = "0.9.1"
24 34 source = "registry+https://github.com/rust-lang/crates.io-index"
25 - checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
35 + checksum = "f1fc76eaeac4c9164506c466d4ffdd8ec9d0c5bf57ee97177c4d8eceb3a0e138"
26 36 dependencies = [
27 - "cfg-if",
28 - "cipher",
29 - "cpufeatures 0.2.17",
37 + "cipher 0.5.2",
38 + "cpubits",
39 + "cpufeatures 0.3.0",
40 + "zeroize",
30 41 ]
31 42
32 43 [[package]]
33 44 name = "aes-gcm"
34 - version = "0.10.3"
45 + version = "0.11.0"
35 46 source = "registry+https://github.com/rust-lang/crates.io-index"
36 - checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
47 + checksum = "fdf011db2e21ce0d575593d749db5554b47fed37aff429e4dc50bc91ac93a028"
37 48 dependencies = [
38 - "aead",
49 + "aead 0.6.1",
39 50 "aes",
40 - "cipher",
51 + "cipher 0.5.2",
41 52 "ctr",
42 53 "ghash",
43 54 "subtle",
55 + "zeroize",
44 56 ]
45 57
46 58 [[package]]
@@ -93,9 +105,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
93 105 checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"
94 106 dependencies = [
95 107 "base64ct",
96 - "blake2",
108 + "blake2 0.10.6",
97 109 "cpufeatures 0.2.17",
98 - "password-hash",
110 + "password-hash 0.5.0",
111 + ]
112 +
113 + [[package]]
114 + name = "argon2"
115 + version = "0.6.0-rc.8"
116 + source = "registry+https://github.com/rust-lang/crates.io-index"
117 + checksum = "7af50940b73bf4e16c15c448a2b121c63f2d68e3e54b6a8731673cb4aa0cdff5"
118 + dependencies = [
119 + "base64ct",
120 + "blake2 0.11.0-rc.6",
121 + "cpufeatures 0.3.0",
122 + "password-hash 0.6.1",
99 123 ]
100 124
101 125 [[package]]
@@ -144,12 +168,6 @@ dependencies = [
144 168
145 169 [[package]]
146 170 name = "base16ct"
147 - version = "0.2.0"
148 - source = "registry+https://github.com/rust-lang/crates.io-index"
149 - checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
150 -
151 - [[package]]
152 - name = "base16ct"
153 171 version = "1.0.0"
154 172 source = "registry+https://github.com/rust-lang/crates.io-index"
155 173 checksum = "fd307490d624467aa6f74b0eabb77633d1f758a7b25f12bceb0b22e08d9726f6"
@@ -168,13 +186,13 @@ checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
168 186
169 187 [[package]]
170 188 name = "bcrypt-pbkdf"
171 - version = "0.10.0"
189 + version = "0.11.0"
172 190 source = "registry+https://github.com/rust-lang/crates.io-index"
173 - checksum = "6aeac2e1fe888769f34f05ac343bbef98b14d1ffb292ab69d4608b3abc86f2a2"
191 + checksum = "144e573728da132683b9488acd528274c790e07fc06ff81ee29f9d8f8b1041e0"
174 192 dependencies = [
175 193 "blowfish",
176 194 "pbkdf2",
177 - "sha2 0.10.9",
195 + "sha2 0.11.0",
178 196 ]
179 197
180 198 [[package]]
@@ -217,6 +235,15 @@ dependencies = [
217 235 ]
218 236
219 237 [[package]]
238 + name = "blake2"
239 + version = "0.11.0-rc.6"
240 + source = "registry+https://github.com/rust-lang/crates.io-index"
241 + checksum = "061f1a09225e328e1ffbb378d2d49923c0ca5fee19fb5ac1cc9c1e9d52b93690"
242 + dependencies = [
243 + "digest 0.11.2",
244 + ]
245 +
246 + [[package]]
220 247 name = "block-buffer"
221 248 version = "0.10.4"
222 249 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -232,25 +259,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
232 259 checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be"
233 260 dependencies = [
234 261 "hybrid-array",
262 + "zeroize",
235 263 ]
236 264
237 265 [[package]]
238 266 name = "block-padding"
239 - version = "0.3.3"
267 + version = "0.4.2"
240 268 source = "registry+https://github.com/rust-lang/crates.io-index"
241 - checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"
269 + checksum = "710f1dd022ef4e93f8a438b4ba958de7f64308434fa6a87104481645cc30068b"
242 270 dependencies = [
243 - "generic-array 0.14.7",
271 + "hybrid-array",
244 272 ]
245 273
246 274 [[package]]
247 275 name = "blowfish"
248 - version = "0.9.1"
276 + version = "0.10.0"
249 277 source = "registry+https://github.com/rust-lang/crates.io-index"
250 - checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7"
278 + checksum = "62ce3946557b35e71d1bbe07ec385073ce9eda05043f95de134eb578fcf1a298"
251 279 dependencies = [
252 280 "byteorder",
253 - "cipher",
281 + "cipher 0.5.2",
254 282 ]
255 283
256 284 [[package]]
@@ -288,11 +316,11 @@ dependencies = [
288 316
289 317 [[package]]
290 318 name = "cbc"
291 - version = "0.1.2"
319 + version = "0.2.1"
292 320 source = "registry+https://github.com/rust-lang/crates.io-index"
293 - checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
321 + checksum = "ce2dc9ee5f88d11e0beb842c88b33c8a5cf0d1329c4b19494af42b07dbfe8896"
294 322 dependencies = [
295 - "cipher",
323 + "cipher 0.5.2",
296 324 ]
297 325
298 326 [[package]]
@@ -326,20 +354,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
326 354 checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
327 355 dependencies = [
328 356 "cfg-if",
329 - "cipher",
357 + "cipher 0.4.4",
330 358 "cpufeatures 0.2.17",
331 359 ]
332 360
333 361 [[package]]
362 + name = "chacha20"
363 + version = "0.10.1"
364 + source = "registry+https://github.com/rust-lang/crates.io-index"
365 + checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81"
366 + dependencies = [
367 + "cfg-if",
368 + "cipher 0.5.2",
369 + "cpufeatures 0.3.0",
370 + "rand_core 0.10.1",
371 + "zeroize",
372 + ]
373 +
374 + [[package]]
334 375 name = "chacha20poly1305"
335 376 version = "0.10.1"
336 377 source = "registry+https://github.com/rust-lang/crates.io-index"
337 378 checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
338 379 dependencies = [
339 - "aead",
340 - "chacha20",
341 - "cipher",
342 - "poly1305",
380 + "aead 0.5.2",
381 + "chacha20 0.9.1",
382 + "cipher 0.4.4",
383 + "poly1305 0.8.0",
343 384 "zeroize",
344 385 ]
345 386
@@ -364,7 +405,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
364 405 checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
365 406 dependencies = [
366 407 "crypto-common 0.1.7",
367 - "inout",
408 + "inout 0.1.4",
409 + "zeroize",
410 + ]
411 +
412 + [[package]]
413 + name = "cipher"
414 + version = "0.5.2"
415 + source = "registry+https://github.com/rust-lang/crates.io-index"
416 + checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
417 + dependencies = [
418 + "block-buffer 0.12.0",
419 + "crypto-common 0.2.2",
420 + "inout 0.2.2",
368 421 "zeroize",
369 422 ]
370 423
@@ -379,9 +432,9 @@ dependencies = [
379 432
380 433 [[package]]
381 434 name = "cmov"
382 - version = "0.5.0-pre.0"
435 + version = "0.5.4"
383 436 source = "registry+https://github.com/rust-lang/crates.io-index"
384 - checksum = "5417da527aa9bf6a1e10a781231effd1edd3ee82f27d5f8529ac9b279babce96"
437 + checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
385 438
386 439 [[package]]
387 440 name = "combine"
@@ -475,15 +528,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
475 528 checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
476 529
477 530 [[package]]
478 - name = "core-models"
479 - version = "0.0.4"
531 + name = "cpubits"
532 + version = "0.1.1"
480 533 source = "registry+https://github.com/rust-lang/crates.io-index"
481 - checksum = "0940496e5c83c54f3b753d5317daec82e8edac71c33aaa1f666d76f518de2444"
482 - dependencies = [
483 - "hax-lib",
484 - "pastey",
485 - "rand 0.9.2",
486 - ]
534 + checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae"
487 535
488 536 [[package]]
489 537 name = "cpufeatures"
@@ -547,26 +595,18 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
547 595
548 596 [[package]]
549 597 name = "crypto-bigint"
550 - version = "0.5.5"
598 + version = "0.7.5"
551 599 source = "registry+https://github.com/rust-lang/crates.io-index"
552 - checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
553 - dependencies = [
554 - "generic-array 0.14.7",
555 - "rand_core 0.6.4",
556 - "subtle",
557 - "zeroize",
558 - ]
559 -
560 - [[package]]
561 - name = "crypto-bigint"
562 - version = "0.7.0-rc.18"
563 - source = "registry+https://github.com/rust-lang/crates.io-index"
564 - checksum = "37387ceb32048ff590f2cbd24d8b05fffe63c3f69a5cfa089d4f722ca4385a19"
600 + checksum = "1a52aa3fcda4e6302a9f48734f234d35d4721b96f8fe07d073f07ce9df4f0271"
565 601 dependencies = [
602 + "cpubits",
566 603 "ctutils",
604 + "getrandom 0.4.2",
605 + "hybrid-array",
567 606 "num-traits",
568 - "rand_core 0.10.0-rc-3",
607 + "rand_core 0.10.1",
569 608 "serdect",
609 + "subtle",
570 610 "zeroize",
571 611 ]
572 612
@@ -583,22 +623,23 @@ dependencies = [
583 623
584 624 [[package]]
585 625 name = "crypto-common"
586 - version = "0.2.1"
626 + version = "0.2.2"
587 627 source = "registry+https://github.com/rust-lang/crates.io-index"
588 - checksum = "77727bb15fa921304124b128af125e7e3b968275d1b108b379190264f4423710"
628 + checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
589 629 dependencies = [
630 + "getrandom 0.4.2",
590 631 "hybrid-array",
632 + "rand_core 0.10.1",
591 633 ]
592 634
593 635 [[package]]
594 636 name = "crypto-primes"
595 - version = "0.7.0-pre.6"
637 + version = "0.7.2"
596 638 source = "registry+https://github.com/rust-lang/crates.io-index"
597 - checksum = "e79c98a281f9441200b24e3151407a629bfbe720399186e50516da939195e482"
639 + checksum = "3633a51a39c69ebbaa4feaa694bd83d241e4093901c84a0963b19d9bb3f0cf8f"
598 640 dependencies = [
599 - "crypto-bigint 0.7.0-rc.18",
600 - "libm",
601 - "rand_core 0.10.0-rc-3",
641 + "crypto-bigint",
642 + "rand_core 0.10.1",
602 643 ]
603 644
604 645 [[package]]
@@ -613,33 +654,35 @@ dependencies = [
613 654
614 655 [[package]]
615 656 name = "ctr"
616 - version = "0.9.2"
657 + version = "0.10.1"
617 658 source = "registry+https://github.com/rust-lang/crates.io-index"
618 - checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
659 + checksum = "baaca1c4b237092596f64d571e9db6ce4109c4ef9742e27590f1709594461f21"
619 660 dependencies = [
620 - "cipher",
661 + "cipher 0.5.2",
621 662 ]
622 663
623 664 [[package]]
624 665 name = "ctutils"
625 - version = "0.3.2"
666 + version = "0.4.2"
626 667 source = "registry+https://github.com/rust-lang/crates.io-index"
627 - checksum = "758e5ed90be3c8abff7f9a6f37ab7f6d8c59c2210d448b81f3f508134aec84e4"
668 + checksum = "7d5515a3834141de9eafb9717ad39eea8247b5674e6066c404e8c4b365d2a29e"
628 669 dependencies = [
629 670 "cmov",
671 + "subtle",
630 672 ]
631 673
632 674 [[package]]
633 675 name = "curve25519-dalek"
634 - version = "4.1.3"
676 + version = "5.0.0"
635 677 source = "registry+https://github.com/rust-lang/crates.io-index"
636 - checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
678 + checksum = "b5eed333089e2e1c1ac8c6c0398e5e2497b4c9926ca6d0365ed1e099afa5bc23"
637 679 dependencies = [
638 680 "cfg-if",
639 - "cpufeatures 0.2.17",
681 + "cpufeatures 0.3.0",
640 682 "curve25519-dalek-derive",
641 - "digest 0.10.7",
683 + "digest 0.11.2",
642 684 "fiat-crypto",
685 + "rand_core 0.10.1",
643 686 "rustc_version",
644 687 "subtle",
645 688 "zeroize",
@@ -715,23 +758,12 @@ checksum = "5729f5117e208430e437df2f4843f5e5952997175992d1414f94c57d61e270b4"
715 758
716 759 [[package]]
717 760 name = "der"
718 - version = "0.7.10"
719 - source = "registry+https://github.com/rust-lang/crates.io-index"
720 - checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
721 - dependencies = [
722 - "const-oid 0.9.6",
723 - "pem-rfc7468 0.7.0",
724 - "zeroize",
725 - ]
726 -
727 - [[package]]
728 - name = "der"
729 761 version = "0.8.0"
730 762 source = "registry+https://github.com/rust-lang/crates.io-index"
731 763 checksum = "71fd89660b2dc699704064e59e9dba0147b903e85319429e131620d022be411b"
732 764 dependencies = [
733 765 "const-oid 0.10.2",
734 - "pem-rfc7468 1.0.0",
766 + "pem-rfc7468",
735 767 "zeroize",
736 768 ]
737 769
@@ -767,6 +799,15 @@ dependencies = [
767 799 ]
768 800
769 801 [[package]]
802 + name = "des"
803 + version = "0.9.0"
804 + source = "registry+https://github.com/rust-lang/crates.io-index"
805 + checksum = "916a94e407b54f9034d71dd748234cd1e516ced6284009906ae246f177eafe5a"
806 + dependencies = [
807 + "cipher 0.5.2",
808 + ]
809 +
810 + [[package]]
770 811 name = "digest"
771 812 version = "0.10.7"
772 813 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -786,7 +827,8 @@ checksum = "4850db49bf08e663084f7fb5c87d202ef91a3907271aff24a94eb97ff039153c"
786 827 dependencies = [
787 828 "block-buffer 0.12.0",
788 829 "const-oid 0.10.2",
789 - "crypto-common 0.2.1",
830 + "crypto-common 0.2.2",
831 + "ctutils",
790 832 ]
791 833
792 834 [[package]]
@@ -817,39 +859,41 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"
817 859
818 860 [[package]]
819 861 name = "ecdsa"
820 - version = "0.16.9"
862 + version = "0.17.0"
821 863 source = "registry+https://github.com/rust-lang/crates.io-index"
822 - checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
864 + checksum = "c0681a4fc24c767085329728d8dfba959af91228aa4610cca4f8ce317ba46ae0"
823 865 dependencies = [
824 - "der 0.7.10",
825 - "digest 0.10.7",
866 + "der",
867 + "digest 0.11.2",
826 868 "elliptic-curve",
827 869 "rfc6979",
828 - "signature 2.2.0",
829 - "spki 0.7.3",
870 + "signature",
871 + "spki",
872 + "zeroize",
830 873 ]
831 874
832 875 [[package]]
833 876 name = "ed25519"
834 - version = "2.2.3"
877 + version = "3.0.0"
835 878 source = "registry+https://github.com/rust-lang/crates.io-index"
836 - checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53"
879 + checksum = "29fcf32e6c73d1079f83ab4d782de2d81620346a5f38c6237a86a22f8368980a"
837 880 dependencies = [
838 - "pkcs8 0.10.2",
839 - "signature 2.2.0",
881 + "pkcs8",
882 + "signature",
840 883 ]
841 884
842 885 [[package]]
843 886 name = "ed25519-dalek"
844 - version = "2.2.0"
887 + version = "3.0.0"
845 888 source = "registry+https://github.com/rust-lang/crates.io-index"
846 - checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9"
889 + checksum = "6ebaa1a2bf1290ab3bfe5a7b771d050ebffab2711c19a81691c683a5144a25de"
847 890 dependencies = [
848 891 "curve25519-dalek",
849 892 "ed25519",
850 - "rand_core 0.6.4",
893 + "rand_core 0.10.1",
851 894 "serde",
852 - "sha2 0.10.9",
895 + "sha2 0.11.0",
896 + "signature",
853 897 "subtle",
854 898 "zeroize",
855 899 ]
@@ -862,20 +906,21 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
862 906
863 907 [[package]]
864 908 name = "elliptic-curve"
865 - version = "0.13.8"
909 + version = "0.14.1"
866 910 source = "registry+https://github.com/rust-lang/crates.io-index"
867 - checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
911 + checksum = "9d65aa39b3a5c1c9c1b745c9a019234bb7a21b77abcb4f4d266d706e2d577d65"
868 912 dependencies = [
869 - "base16ct 0.2.0",
870 - "crypto-bigint 0.5.5",
871 - "digest 0.10.7",
913 + "base16ct",
914 + "crypto-bigint",
915 + "crypto-common 0.2.2",
916 + "digest 0.11.2",
872 917 "ff",
873 - "generic-array 0.14.7",
874 918 "group",
875 919 "hkdf",
876 - "pem-rfc7468 0.7.0",
877 - "pkcs8 0.10.2",
878 - "rand_core 0.6.4",
920 + "hybrid-array",
921 + "pem-rfc7468",
922 + "pkcs8",
923 + "rand_core 0.10.1",
879 924 "sec1",
880 925 "subtle",
881 926 "zeroize",
@@ -945,19 +990,19 @@ checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
945 990
946 991 [[package]]
947 992 name = "ff"
948 - version = "0.13.1"
993 + version = "0.14.0"
949 994 source = "registry+https://github.com/rust-lang/crates.io-index"
950 - checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
995 + checksum = "a1f686ab92a9fb0eaf188f6c6c87b89490baa6fdb0db4544ba4dc47f7942489f"
951 996 dependencies = [
952 - "rand_core 0.6.4",
997 + "rand_core 0.10.1",
953 998 "subtle",
Lines truncated
@@ -4,7 +4,7 @@ version = "0.1.1"
4 4 edition = "2024"
5 5
6 6 [dependencies]
7 - russh = "0.58"
7 + russh = "0.62"
8 8 russh-sftp = "2.1"
9 9 ratatui = "0.30"
10 10 crossterm = "0.29"
@@ -12,6 +12,7 @@ tokio = { version = "1", features = ["full"] }
12 12 reqwest = { version = "0.13", default-features = false, features = ["json", "rustls", "query"] }
13 13 serde = { version = "1", features = ["derive"] }
14 14 serde_json = "1"
15 + rand = "0.10"
15 16 tracing = "0.1"
16 17 tracing-subscriber = { version = "0.3", features = ["env-filter"] }
17 18 anyhow = "1"
@@ -123,12 +123,13 @@ fn load_or_generate_host_key(path: &std::path::Path) -> anyhow::Result<PrivateKe
123 123 Ok(key)
124 124 } else {
125 125 tracing::info!(path = %path.display(), "generating new ed25519 host key");
126 - // Use the rand_core OsRng re-exported through russh's ssh_key dependency
127 - // to avoid version conflicts with the standalone rand crate.
128 - let key = ssh_key::private::PrivateKey::random(
129 - &mut keys::signature::rand_core::OsRng,
130 - Algorithm::Ed25519,
131 - )?;
126 + // `rand::rng()` is a CSPRNG seeded from the OS. It used to be routed
127 + // through russh's re-exported rand_core to dodge a version conflict with
128 + // the standalone rand crate; russh 0.62 dropped its rand_core RC pin, so
129 + // both now agree on rand 0.10 and the workaround is gone. This is the
130 + // same call russh itself uses to generate keys.
131 + let key =
132 + ssh_key::private::PrivateKey::random(&mut rand::rng(), Algorithm::Ed25519)?;
132 133 // Save to disk in OpenSSH format
133 134 let pem = key.to_openssh(ssh_key::LineEnding::LF)?;
134 135 if let Some(parent) = path.parent() {
@@ -6,7 +6,7 @@ use std::path::PathBuf;
6 6 use std::sync::Arc;
7 7
8 8 use russh::keys::{HashAlg, PublicKey};
9 - use russh::server::{Auth, Msg, Session};
9 + use russh::server::{Auth, ChannelOpenHandle, Msg, Session};
10 10 use russh::{Channel, ChannelId};
11 11 use tokio::sync::Mutex;
12 12
@@ -157,13 +157,20 @@ impl russh::server::Handler for MnwHandler {
157 157 async fn channel_open_session(
158 158 &mut self,
159 159 channel: Channel<Msg>,
160 + reply: ChannelOpenHandle,
160 161 _session: &mut Session,
161 - ) -> Result<bool, Self::Error> {
162 + ) -> Result<(), Self::Error> {
162 163 let channel_id = channel.id();
163 164 tracing::debug!(channel = %channel_id, "session channel opened");
164 165 // Store channel for later consumption by shell_request or subsystem_request
165 166 self.channels.lock().await.insert(channel_id, channel);
166 - Ok(true)
167 + // russh 0.62 replaced the `Ok(true)` accept with an explicit handle.
168 + // Registering the channel before accepting keeps the old ordering: the
169 + // peer never proceeds against a channel this handler cannot find. An
170 + // undropped handle rejects with AdministrativelyProhibited, so failing
171 + // to accept closes the channel rather than hanging it.
172 + reply.accept().await;
173 + Ok(())
167 174 }
168 175
169 176 async fn pty_request(