Try something like this:
ssh [email protected] "cd /home && ls -l"
More Related Contents:
- Certain Unix commands fail with “… not found”, when executed through Java using JSch
- Multiple commands through JSch shell
- Capturing stdout when calling Runtime.exec
- How to run Unix shell script from Java code?
- How to invoke a Linux shell command from Java
- execute shell command from android
- SSH library for Java [closed]
- How to resolve Java UnknownHostKey, while using JSch SFTP library?
- Runtime’s exec() method is not redirecting the output
- How to read JSch command output?
- How to stop java process gracefully?
- com.jcraft.jsch.JSchException: UnknownHostKey
- Providing input/subcommands to command executed over SSH with JSch
- Connect to remote MySQL database through SSH using Java
- JSchException: Algorithm negotiation fail
- Running Shell commands though java code on Android?
- How do I run SSH commands on remote system using Java? [closed]
- The cipher ‘aes256-cbc’ is required, but it is not available
- convert openSSH rsa key to javax.crypto.Cipher compatible format
- Sending commands to server via JSch shell channel
- Algorithm negotiation fail SSH in Jenkins
- java Runtime.getRunTime().exec & wildcards?
- What is the difference between the ‘shell’ channel and the ‘exec’ channel in JSch
- Running java with JAVA_OPTS env variable has no effect
- Public key authentication fails with JSch but work with OpenSSH with the same key
- SFTP file transfer using Java JSch
- How to generate ssh compatible id_rsa(.pub) from Java
- Using Keys with JGit to Access a Git Repository Securely
- Multiple commands using JSch
- SSH connection with Java