Questions tagged [apache-sshd]

Apache SSHD is a Java library based on Apache MINA to support SSH protocols like SCP or SFTP both client and server side.

45 questions
6
votes
1 answer

How to set max concurrent logins per user in apache SshServer

I need to limit the concurrent sessions allowed per user in an apache SshServer. I found two references to this functionality, but they seem to be obsolete. Here's the original patch back in 2010: https://issues.apache.org/jira/browse/SSHD-95 I also…
UncleBob
  • 1,233
  • 3
  • 15
  • 33
5
votes
0 answers

how to fix java.net.SocketException: Permission denied on ubuntu

I'm using apache mina sshd to produce a ssh server so that users could be able to access a specific system remotely. here is a part of my code: SshServer sshd = SshServer.setUpDefaultServer(); sshd.setPort(830); …
Majid Roustaei
  • 1,556
  • 1
  • 20
  • 39
4
votes
1 answer

Apache MINA sshd | When I added the dependency and import it in the class I get "the type org.apache.sshd.client.SshClient is not accessible" error

I use Java 11 with JavaFX. When I added Apache MINA as a Maven dependency and then perform an import statement in the java class I get the following error message: "The type org.apache.sshd.client.SshClient is not accessible" I have added the…
sm-a
  • 65
  • 3
3
votes
1 answer

Apache MINA SSHD session echoes characters twice when using ProcessShellFactory, control characters don't work

I'm running OpenJDK 14 on macOS 10.15.7. I'm doing some proof-of-concept code establishing an SSH server with Apache Mina SSHD and then connecting to it. Here's what I have: import java.io.IOException; import java.nio.file.Paths; import…
Nick Williams
  • 2,864
  • 5
  • 29
  • 43
2
votes
1 answer

Apache Mina SFTP: Mount Remote Sub-Directory instead of Filesystem Root

I would to use Apache SSHD to create an SFTP server and use SftpFileSystemProvider to mount a remote directory. I successfully create the virtual file system with SftpFileSystemProvider following the documentation…
Rémi Lavolée
  • 48
  • 1
  • 11
2
votes
0 answers

Using apache sshd and commons vfs on windows

I'm recently working on a file agent that will be deployed on machine of both linux and windows to perform unified file transfer. It generally consist of a sshd server and a vfs manager. Usually one agent would use the vfs manager to connect to the…
Qiuchi
  • 21
  • 3
2
votes
0 answers

Apache SSHD client unverified EC key warnings on camel route

I have a camel route that uses the ssh component provided by camel through the dependency import via implementation("org.apache.camel:camel-ssh"), i think this basically pacakges up the apache sshd client. So, what I was wondering was how to remove…
has400
  • 49
  • 1
  • 9
2
votes
5 answers

Setting ssh keys to use with jgit with ssh from apache sshd

I'm running git commands using jgit from a java application running in a kubernetes container, so I want to allow customizing the ssh key storage location and the like. My first approach was with ssh supported with the jsch implementation but ran…
juhanic
  • 805
  • 8
  • 16
2
votes
1 answer

how to execute remote commands using apache mina sshd

I am trying to execute remote commands on an SSHServer running on my local windows machine. I am able to run simple command like "whoami" but failing to run something like "java -version" or "dir" Here is my code so far, can you tell where I am…
vkp
  • 91
  • 4
  • 17
2
votes
1 answer

How to upload/download files using apache SSHD ScpClient

I don't know what I doing wrong in setting up a ScpClient to send/receive files. I am using Apache MINA SSHD library to start a SSH server and try to copy files to/from it. Here is my setup: SSHServer.java public class SSHServer { private…
vkp
  • 91
  • 4
  • 17
2
votes
0 answers

Apache MINA SSHD java.security.InvalidKeyException: The security strength of SHA-1 digest algorithm is not sufficient for this key size

We are running SFTP server using Apache SSHD mina. With Java 7 , everything works fine. But with Java 8, we are getting the below exception when any SFTP client is trying to connect. How to fix this issue in server side with Java 8. The client can…
JavaUser
  • 25,542
  • 46
  • 113
  • 139
2
votes
1 answer

How to block SFTP remove operations with Apache MINA SSHD

I am trying to create a custom sftp server using Apache Mina SSHD. My code so far: SshServer sshd = SshServer.setUpDefaultServer(); sshd.setPort(PORT_NUMBER); sshd.setKeyPairProvider(new…
Darlyn
  • 4,715
  • 12
  • 40
  • 90
2
votes
2 answers

How to run an Apache-Mina SSHD-Server (2.2.0) on Android Pie?

I'm trying to run an Apache MINA SSHD Server (v. 2.2.0) on an Android Pie (API 28.0) device. I found various post about it running on Android 4 devices, but none of them seems to work on my Android 9 device. So I tried to implement it myself but got…
Me7e0r
  • 67
  • 1
  • 9
1
vote
0 answers

How to create an instance of KnownHostsServerKeyVerifier for host key verification in the SSHClient of Apache Mina SSHD java library

I am trying to connect to a remote server using the SshClient of java library Apache MINA SSHD. I want to pass my known_hosts file also to the SshClient so that the hosts are also verified before connecting to the server. I need to use the class…
1
vote
0 answers

How to load known host key from String instead of filesystem?

I have a Spring Boot application with Apache SSHD. Therefore, the application needs a known host key. How to provide this known host key? For production I can use a static known_hosts file, but for integration test I need a dynamically generated…
dur
  • 15,689
  • 25
  • 79
  • 125
1
2 3