Category : jsch

I want to use JSch in Kotlin to connect to my OpenWRT router via SSH, with an SSL key. OpenWRT supports keys, generated with ssh-keygen (https://openwrt.org/docs/guide-user/security/dropbear.public-key.auth). ssh-keygen -t rsa -b 4096 This generates a public id_rsa.pub and private id_rsa key. OpenWRT accepts this id_rsa.pub. I want JSch to use the private key: private fun sshCommand( ..

Read more

I am implementing an android app which needs to connect to a sftp server. Unfortunately I am not able to add the private key. I have tried several paths, but I get always the Exception com.jcraft.jsch.JSchException: java.io.FileNotFoundException . This is what I have tried, with different paths: JSch ssh = new JSch(); ssh.addIdentity("./privatekey"); How to ..

Read more

I try to remote ssh with java jsch on android and i always get failure. I got this code from old github. I tried various ways but did not know the problem. I am also new to Android and still do not know much about Android. public class MainActivity extends AppCompatActivity { Button btn; TextView ..

Read more

So I am trying to run this Android Studio code. Over SSH with the module JSch my code should send the command "mkdir Hello" to my Raspberry pi3. But on my Raspberrypi nothing happens, What can I do? import com.jcraft.jsch.ChannelExec; import com.*; import com.jcraft.jsch.JSch; import com.jcraft.jsch.Session; import java.io.InputStream; import java.util.ArrayList; import java.util.Properties; public class MainActivity ..

Read more