I am just doing ssh me1@ipaddress
to a remote machine, where I can't understand what is happening. This command again asks for username and password twice like this:
$ ssh me1@ip
username : me2
password :
I am using JSch which allows specifying one set of username and password like shown below syntax:
new JSch().getSession(userName, connectionIP, connectionPort)
But in this scenario, we need to provide two usernames as me1
and me2
.
How can I achieve this using JSch or any other library in Java?