Questions tagged [sshj]

SSHJ is an SSH Client library written in Java.

SSHJ is an SSH Client library written in Java. Its homepage is https://github.com/hierynomus/sshj/ and it is Apache 2.0 licensed.

The sourcecode is hosted publicly at https://github.com/hierynomus/sshj

118 questions
0
votes
1 answer

sshj: How to pipe input to automated host-side script

So, here's the situation: I would like to use the sshj library to connect to a host which automatically runs a script on connection. Let's say the script merely logs whatever json formated input it receives. In the terminal I can run something…
0
votes
0 answers

sshj : permissions problems when downloading file

I am trying to download some files vis sftp using a java application which uses the sshj library. I am using this tutorial My code is as follows: try { sftpClient = client.newSFTPClient(); remoteFileList =…
badperson
  • 1,554
  • 3
  • 19
  • 41
0
votes
1 answer

Sshj library for download multifiles in remote server

I use Java 8 and my condition is to download multiple file in a remote server using sftp protocol, is not necessary to filter file for his name but necessary to download all file in a specific remote folder. i see the library com.hierynomus » sshj…
Mattia
  • 13
  • 5
0
votes
0 answers

Installing Software via SSHJ results in exit code 127

I am trying to write a software to automatically install Linpack on a CentOS Server. Here's the code I've been working with so far First, I upload 2 zip files to the SFTP Server that's running on CentOS, which works fine. Then I extract those 2…
Korlimann
  • 147
  • 14
0
votes
1 answer

Set allowed transport and MAC ciphers for SSHClient

I'm trying to modify an SSH client using SSHJ so that it only allows certain ciphers. I have properties in a properties file something like this: sftp.transport.ciphers = aes256-gcm,aes256-ctr,aes256-etcera sftp.mac.ciphers =…
quantumferret
  • 473
  • 6
  • 12
0
votes
1 answer

File transfer using SFTP from another server

I can able to upload local system file to SFTP client using below code, try { final SSHClient ssh = new SSHClient(); ssh.addHostKeyVerifier(new PromiscuousVerifier()); ssh.connect("100.XX.XX.XX"); …
MMMMS
  • 2,179
  • 9
  • 43
  • 83
0
votes
1 answer

Get files from sftp using sshj and PuttyKeyFile

I am trying to fetch files from sftp server, but even I tryed many different approaches, it's still gives me an error userauth.UserAuthenticationExeption: "Exhausted availible authentication methods", and IllegalStateException: "Not…
0
votes
0 answers

Why is the SSHJ maximum write size 32KB?

I have been using SSHJ to write files to my remote SFTP server. The current set up is I have a Spring Batch ItemWriter that writes chunks of data arbitrarily to a file. Jsch does not support this feature as if the chunks come in out of order then…
0
votes
1 answer

Need information related to sshj library. How logging works?

I'm trying to transfer a file from one server to other server using sftp protocol. So, I'm trying to use sshj library for this. Now before transferring the file I'm performing several activities such as zipping and after transferring unzipping . So,…
0
votes
1 answer

how to avoid or disable default logging of sshj library

I'm using SSHJ library to transfer files over sftp. I took help from the follwing blog: https://www.baeldung.com/java-file-sftp When I run the program it was throwing some sl4j issues, so I added sl4j dependencies in my project and added the…
0
votes
1 answer

How should I use sshj to connect with ssh, which makes me very confused

Although there are examples in sshj's github, I don’t understand what I’m doing. I use the following code to try to connect to my host, and that’s it @Test public void sshTest() throws IOException { SSHClient client = new SSHClient(); …
Tablo_Jhin
  • 301
  • 1
  • 3
  • 10
0
votes
0 answers

JAVA SSH client using key authentication

I am trying to connect to SFTP server, running on another laptop at my home (running on win 10) I am using SSHJ library. When I use authentication with password, it works fine: client.authPassword("myUserName", "myPassword") But when I am trying…
Gilo
  • 640
  • 3
  • 23
0
votes
1 answer

SFTP upload using SSHJ and ed25519 experiencing key Issues

I'm trying to set up an SFTP upload with an ed25519 authentication, but I keep getting this error: Exception in thread "main" java.lang.UnsupportedOperationException: Don't know how to decode key:ssh-ed25519 This is my code: import…
Jon Lord
  • 3
  • 2
0
votes
1 answer

How to achieve SSH user/password authentication with SSHJ

I am trying to create an Android app to connect via SSH to a Dell PowerConnect switch to perform straightforward tasks on command (for example, turn off/on POE for a port to remote reset a POE device). I am using the SSHJ library but can't get it…
Thale
  • 3
  • 3
0
votes
0 answers

Implementing Jump Hosts with SSHJ

Somebody asked for this and there is a pull-request which contains code that somehow was rewritten before it got merged and somebody managed to code a solution based on the pull-request. However, there is no example for the final version in that…
sjngm
  • 12,423
  • 14
  • 84
  • 114