Results 1 to 6 of 6

Thread: SSH For Connecting Java Application To A Remote Server

  1. #1
    Join Date
    Jan 2009
    Posts
    66

    SSH For Connecting Java Application To A Remote Server

    Hello, I have recently completed my learning in java language. And I have one question about it. Suppose, I want to connect a Java application to a remote server with the Help of SSH, then how can we do that. Is it possible to make use of any built in API which can help me in this problem? OR we may need to make use of the JDBC for getting this. way to handle this?
    If anyone is having solution for this then please help me to get the solution.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: SSH For Connecting Java Application To A Remote Server

    Hello, I don't think that this may be possible. And if possible then you can get it from the different books below. As I am fresher I don't have any knowledge about it:
    • Java Distributed Computing (Jim Farley)
    • Lecture Notes of Java Distributed Computing (R. Whitney)
    • Designing Java Applications for Network Computers (Oscar Cepeda, Jens Andexer, Craig Grossi, Timothy Luke)
    • The JXTA Book
    • JXTA Java Programmers Guide

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: SSH For Connecting Java Application To A Remote Server

    Hi, I think you need to make use of the JSch. It is the pure java implementation of SSH2. If you are using it then then it can help you to create connection to an sshd server and use port forwarding, X11 forwarding, file transfer. So, you just need to try this for making connection of Java Application To A Remote Server. It may solve your problem.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: SSH For Connecting Java Application To A Remote Server

    Hello, I have got the following code which can help you to accessed via SSH local tunnel by the use of java applet:
    Code:
    public void init() 
    {
    try 
    {
    one = (Hello)Naming.lookup(getCodeBase().getHost());
    message = one.sayHello();
    } 
    catch (Exception e) 
    {
    System.out.println("HelloApplet exception: " +e.getMessage());
    e.printStackTrace();
    }
    }

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: SSH For Connecting Java Application To A Remote Server

    Hello, I have seen one software which can solve your problem. You may need to make use of the FtpPhpClient 0.2. If you are making use of this then you can able to use the FtpPhpClient which is a web script to connect with any ftp server. But, it may be possible to use it if you are in intranet or Internet without any client. So, just make use of this and solve your problem.

  6. #6
    Join Date
    May 2008
    Posts
    2,012

    Re: SSH For Connecting Java Application To A Remote Server

    Hello, I am not getting you problem actually. I think you want to get the access of the mysql server which is running remote location and overthere you want to listen to the SSH tunnel. So, for doing this, if you want to use the port 1234 on your computer and you want to send it to the port 3306. So, for that you may need to make use of the command below:
    Code:
    ssh -L 1234:localhost:3306 mysql.server.remote

Similar Threads

  1. KIS update Failed (error connecting to remote server)
    By Laila in forum Networking & Security
    Replies: 4
    Last Post: 20-02-2011, 10:28 PM
  2. Replies: 4
    Last Post: 21-12-2010, 08:04 PM
  3. Remote Desktop Protocol Server Application
    By Agustíne in forum Networking & Security
    Replies: 4
    Last Post: 10-03-2010, 08:06 PM
  4. Issues in C# application connecting to Remote MySQL 5 database.
    By kyosang in forum Software Development
    Replies: 5
    Last Post: 25-01-2010, 04:24 PM
  5. Replies: 3
    Last Post: 29-06-2009, 06:47 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,557,304.39928 seconds with 17 queries