File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/main/kotlin/io/meshcloud/dockerosb/config Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,17 @@ class CustomSshSessionFactory(
13
13
private val sshKey : String
14
14
) : JschConfigSessionFactory() {
15
15
16
-
17
16
override fun configure (hc : OpenSshConfig .Host , session : Session ) {
18
17
session.setConfig(" StrictHostKeyChecking" , " no" )
18
+
19
+ /*
20
+ Because of End of SSH-RSA support for Azure Repos (https://devblogs.microsoft.com/devops/ssh-rsa-deprecation/)
21
+ we need to explicitly put "ssh-rsa" last in the list in server_host_key so that it is not picked up first.
22
+ */
23
+ session.setConfig(" server_host_key" ,
24
+ session.getConfig(" server_host_key" ).
25
+ split(" ," ).partition { it == " ssh-rsa" }
26
+ .let { it.second + it.first }.joinToString(" ," ))
19
27
}
20
28
21
29
@Throws(JSchException ::class )
@@ -31,4 +39,4 @@ class CustomSshSessionFactory(
31
39
jsch.addIdentity(keyPath)
32
40
return jsch
33
41
}
34
- }
42
+ }
You can’t perform that action at this time.
0 commit comments