What steps will reproduce the problem?
I am able to connect to the server. I am sending a line with the date
command. When I getline i am getting date as the output instead of the
actual date. Please advise.
What is the expected output? What do you see instead?
I wanted to see the system date. But it printed date instead.
What version of the product are you using? On what operating system?
I am using eclipse ganymede on windows
Please provide any additional information below.
My code below:
import java.io.IOException;
import org.twdata.enchanter.SSH;
import org.twdata.enchanter.impl.DefaultSSH;
public class Connect {
public static void main(String[] args) throws IOException {
SSH ssh = new DefaultSSH();
ssh.connect("124.153.88.38", 22, "netmagic", ")nly4Noc");
// ssh.waitFor(':~>');
ssh.sendLine("date");
ssh.waitFor("]$");
String l = ssh.getLine();
System.out.println("Server date is: " + l);
ssh.disconnect();
}
}
Original issue reported on code.google.com by farooqka...@gmail.com on 9 Mar 2010 at 6:22
Original issue reported on code.google.com by
farooqka...@gmail.com
on 9 Mar 2010 at 6:22