Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: SSH

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default SSH

    Hi guys.... i am using SSH to connect to a linux machine using a java code running on windows.I am calling session.executeCommand()
    method to execute a command on the remote machine but the execution fails and am getting the following output :

    INFO: Command is touch /root/sshtest.txt
    Feb 1, 2011 12:40:42 PM com.sshtools.j2ssh.connection.ConnectionProtocol sendChannelRequest
    INFO: Sending exec request for the session channel
    Feb 1, 2011 12:40:42 PM com.sshtools.j2ssh.connection.ConnectionProtocol sendChannelRequest
    INFO: Waiting for channel request reply
    Feb 1, 2011 12:40:42 PM com.sshtools.j2ssh.connection.ConnectionProtocol sendChannelRequest
    INFO: Channel request failed
    Feb 1, 2011 12:40:42 PM com.sshtools.j2ssh.connection.ConnectionProtocol closeChannel
    INFO: Local computer has closed channel 0[session]

    please reply if you can track down the problem with execution of command.
    Last edited by rachana; February 2nd, 2011 at 12:58 AM. Reason: [Solved]


  2. #2
    Junior Member
    Join Date
    Feb 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SSH

    Are you trying to use SFTP, right?
    If not, try to use it...
    If yes, post your code.

  3. #3
    Junior Member
    Join Date
    Jan 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SSH

    no i wasnt using Sftp. i was simply executing command using Sssh client.

  4. #4
    Junior Member
    Join Date
    Jan 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: SSH

    Quote Originally Posted by dmax View Post
    Are you trying to use SFTP, right?
    If not, try to use it...
    If yes, post your code.
    hey do u you know how to create keys using j2ssh...i want to connect linux(server) from windows(client)