Replies: 1 comment
-
Duplicated #6418 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Help please.
How to initialize container with private and public keys for specific user?
It does not work. ERROR: com.jcraft.jsch.JSchException: Auth fail
protected static final GenericContainer sftpContainer = new GenericContainer<>(DockerImageName.parse("atmoz/sftp:latest"))
.withExposedPorts(22)
.withCopyFileToContainer(MountableFile.forHostPath("src/test/resources/key/testKey"),
"/home/tester/.ssh/ed/id_rsa")
.withCopyFileToContainer(MountableFile.forHostPath("src/test/resources/key/testKey.pub"),
"/home/tester/.ssh/ed/id_rsa.pub")
.withCommand("tester::1001");
Beta Was this translation helpful? Give feedback.
All reactions