posted 7 years ago
Here's how a Linux(Unix) ssh client would do that against a remote Linux or Unix host:
ssh user@remotehost cat thefile.txt
If memory serves, Windows uses the "TYPE" command to list what's in a text file. Linux uses "cat" (it's an old joke and a cruel one), and "type" checks a file's type (not that that matters here).
However, Windows doesn't have a remote SSH server last time I remembered unless maybe PuTTY offers one as a third-party add-on. Which means that if your Java SSH app really does connect as an SSH client to a Windows computer, we need to know what on the Windows computer the Java app is talking to.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.