PlanetJava
Custom Search

java-jsch
[Top] [All Lists]

Re: Can we telnet on top of SSH connectivity through JSch ?

Subject: Re: Can we telnet on top of SSH connectivity through JSch ?
Date: Wed, 9 Dec 2009 17:44:02 +0800
PortForwardingL is for ssh tuning. SSH can tune any traffic including
telnet. You can ssh to the server (you need to type ssh password), create a
tunnel,  the you open another telnet client to the tunnel.
This way you use telnet as normal and it is protected by ssh.
Now back to your problem, I am not quite sure what is the "telnet" you are
talking about. Telnet is another program, not an ssh feature, you don't
telnet using JSCH.
You can SSH to the server and run linux command on it, this is called
"shell session" but works similar to telnet. I assumed you meant "shell
session" by "telnet".
To use SSH this way, you have to install SSHD on your server ( I suppose
you already have it), then use a SSH client to it from your client.
JSCH have an example class named Shell.java to work as a client, it works
out of box as far as I know.
Pan Li
http://Prominic.NET  ||  PanLi-vhMVPb50fiM/[email protected]
8620-82316133
  From:       Prasad Shindikar 
<[email protected]>            
  To:         Heiner Westphal 
<[email protected]>, [email protected]
  Cc:         [email protected]      
  Date:       2009/12/09 17:30                                         
  Subject:    Re: [JSch-users] Can we telnet on top of SSH connectivity through 
JSch ?
Hi,
I figured out that when I try to enter the password for telnet login
manually, it is accepted.
However, it gives "Password Incorrect" message when I try to do the same
through Java. I have a Linux machine for development environment.
Does this mean that the telnet expects the password to be entered only by
waiting on keystrokes ? If yes, is there some way in which we can change
these settings ?
Heiner Westphal,
My password is c1sc0fR33. I don't think any of these characters are outside
the ASCII range. I have just appended the password field with a 'newline'
character.
Pan Li,
The PortForwardingL.java might be for the same user (who has logged using
SSH) to share the port and session across a telnet session ? What I want to
do is to connect to a remote machine using SSH credentials. Now that I am
connected, I would like to telnet to some other remote machine with the
different credentials using the same JSch library calls.
Do let me know your views on the same.
Regards,
Prasad Shindikar
On Wed, Dec 9, 2009 at 12:44 AM, Heiner Westphal <
[email protected]> wrote:
  Pan Li already pointed out the two possible ways jsch could be involved
  with telnet. None of which could possibly be responsible for
  a failed login.
  I guess your server uses a character encoding different from your
  client's. This invalidates your password, if you use characters outside
  the range of ASCII.
  Try "echo $LANG" on your server, if it is a u*ix box.
  Current versions of linuces use UTF-8 while Windows sticks
  to cp1250 (?) - at least my Win XP does.
  You can try to start your client with
   java -Dfile.encoding=UTF-8
  and see if it makes any difference.
  Regards,
  Heiner
  Pan Li wrote:
   I am not sure I understand you question correctly.
   If you mean you want to run shell command on remote server, then you
   should find Shell.java to see how it works
   If you mean you want to use a telnet client over an SSH connection, see
   PortForwardingL.java
   Pan Li
   http://Prominic.NET || PanLi-vhMVPb50fiM/[email protected]
   8620-82316133
   Inactive hide details for Prasad Shindikar ---2009/12/08 13:41:12---Hi
   JSch Users, I would like to telnet to another machine, aPrasad Shindikar
   ---2009/12/08 13:41:12---Hi JSch Users, I would like to telnet to
   another machine, after SSHing using JSch to a
   From:
   Prasad Shindikar <[email protected]>
   To:
   [email protected]
   Date:
   2009/12/08 13:41
   Subject:
   [JSch-users] Can we telnet on top of SSH connectivity through JSch ?
   ------------------------------------------------------------------------
   Hi JSch Users,
   I would like to telnet to another machine, after SSHing using JSch to a
   gateway.
   Is telnet supported on top of SSH functionality?
   I am getting an error while trying to enter the password. Although the
   password is correct, I get back a response saying "Password Incorrect".
   Any help in this regard is appreciated.
   Regards,
   Prasad
Shindikar------------------------------------------------------------------------------
   Return on Information:
   Google Enterprise Search pays you back
   Get the facts.
   http://p.sf.net/sfu/google-dev2dev
   _______________________________________________
   JSch-users mailing list
   [email protected]
   https://lists.sourceforge.net/lists/listinfo/jsch-users
   ------------------------------------------------------------------------
------------------------------------------------------------------------------
   Return on Information:
   Google Enterprise Search pays you back
   Get the facts.
   http://p.sf.net/sfu/google-dev2dev
   ------------------------------------------------------------------------
   _______________________________________________
   JSch-users mailing list
   [email protected]
   https://lists.sourceforge.net/lists/listinfo/jsch-users
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
  • Can we telnet on top of SSH connectivity through JSch ?
    • Re: Can we telnet on top of SSH connectivity through JSch ?
      • Re: Can we telnet on top of SSH connectivity through JSch ?
        • Re: Can we telnet on top of SSH connectivity through JSch ?,
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy