Connection of SSH or TELNET

Hello to all,
I want develop an application to connect with remote system through of SSH or TELNET.
I hope somebody can help me
thank to all

There is one, quick and easy way to do this. Download Ant from ant.apache.org. Then go to Sourceforge and download JSch. Ant uses JSch for SSH. You can view their code and implement your own SSH client via JSch. The whole process took me 20 minutes.
- Saish

Similar Messages

  • Connection through of SSH or TELNET

    Hello to all,
    I want develop an application to connect with remote system through of SSH or TELNET.
    I hope somebody can help me
    thank to all

    http://forum.java.sun.com/thread.jspa?messageID=3328644&#3328644

  • Log ssh and telnet connections

    Hi guys,
    if you want to log all ssh and telnet connections to your system, what entry do you put in /etc/syslog.conf file?
    Thank you

    Google is your friend:
    http://www.unix.com/solaris/128310-logging-incoming-connections-solaris-10-a.html

  • ORA Connect via SSH Tunnel on Windows failed! LINUX works ...

    Hello again,
    i tried to establish a Oracle Client Connection via SSH Tunnel on WinXP Pro.
    1. Opened SSH-Tunnel Connection with plink (putty)
    TUNNEL: 10.5.1.111:1521 => localhost:1521
    (plink works fine with telnet, MySQL Client and other stuff)
    2. Connected with Oracle Client on Tunnel END => Localhost, Port 1521
    3. WIth ORA8i i got: Paket Error, With ORA10g i get: TNS: no listener
    plink works fine, so i dont think the problem is located there.
    i tried, tnsnames.ora, easyconnect and TNS-Less. So i guess, its not related to the connection method.
    i tried the same on LINUX ... ssh tunnel and sqlplus connect ... IT WORKS !
    Does Oracle need an aditional Port?
    Does it have Problems with WIN2UNIX Connections? (ORA DB is on UNIX)
    tnx

    Hi,
    Hum..., I guess this not work!
    Looking for this schema below, you need put the 1521 port
    If you desire, access the www.ssh.com site and download other ssh program
               Secure Connection
       +---->-------[SSH]-------->-----+
       |                               |
       |                               |
       ^                               |
       |       Insecure Connection     v
    CLIENTE--->--------------------> ORACLE
    ssh2 -l oracle -L 1521:192.148.1.251:1521 200.10.11.12
                        |          |                |
                        |          |                |
                   A  LOCAL        |                |
                   B       INTERNAL IP ORACLE       |
                   C                       EXTERNAL IP (GATEWAY)
                                                         C                             B
          | Firewall| . . . . .|INTERNET| . . . . . . |Firewall| . . . . . . . . . . |ORACLE|
          | Gateway |                                 |Gateway |                 192.148.1.251:1521
               .                                     200.10.11.12                                  
         A     .
       |Oracle Client|
       (TNSNAMES.ORA)
         <SERVICO> =
           (DESCRIPTION =
             (ADDRESS_LIST =                     
               (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
             (CONNECT_DATA =
               (SID = <ORCL>)
           )Cheers

  • Getting "Server refused to allocate pty" when connecting from ssh

    Hi All,
    I am getting "Server refused to allocate pty" when connecting from ssh to our Solaris 10 8/07 server. I searched in goggle but couldn't find a solution. But from telnet, all users are able to login without any problems. My ssh is default one that comes with sol 10.
    Please help if anybody has a solution for this
    Thanks in advance.

    I am seeing this on a sparc solaris 10. root can ssh in and the console is fine but regular users cannot
    ssh in . Do you have any suggestions for sparc solaris 10? I don't believe the mount suggestion makes
    sense in my environment.
    My root drive crashed so I resinstalled solaris but now ssh does not work. telnet works fine but I don't like
    telnet.
    I get
    Server refused to allocate pty and
    Server send disconnect message
    type2 (SSH_DISCONNECT_PROTOCOL_ERROR)
    "Could not create socket pairs: permission denied"
    Thanks
    Thomas

  • Airport express wireless connection freezes SSH connection - any fixes?

    airport express wireless connection freezes SSH connection - any fixes?
    so i am using an airport express and remotely access computers/servers via SSH. port forwarding is set up and the computer has a fixed local IP address.
    if i continue to issue command in the shell, then the connection persists. however, if i leave it idle for some amount of time more than a half an hour, both terminal and xterm (X11) freeze for a considerable amount of time. then they time out and return to a active shell on the local computer.
    i have since determined that this does not occur if i am using a direct (built-in) ethernet connection.
    is this problem fixable? are there settings in airport admin utility that can be changed to prevent this from occuring?
    any advice or pointers would be tremendously appreciated
    stefanos

    hi bill,
    thank you for the suggestion. i added the lines to my .ssh/config file and so far it seems to have solved the problem.
    i'll evaluate it over the next few days and post back if i notice any problems. it seems to achieve what i was thinking at least conceptually. to somehow, while idle, send something to ensure the connection stays alive.
    many thanks for the solution. it's been a nagging issue and it's great to be likely rid of it.
    stefanos
    Powerbook G4 & iMac G5 :: Mac OS X (10.4.9)

  • 1841 = Unable to connect via SSH

    I am able to connect to this router via a crypto isakmp tunnel using telnet. However, I am unable to setup SSH on this thing. Can someone please assist me in what I may be missing. I am at a dead end now. I have posted router info and similar input below.
    Cisco IOS Software, 1841 Software (C1841-ADVSECURITYK9-M), Version 12.4(3), RELEASE SOFT
    WARE (fc2)
    ======================================
    ip domain name CISCO$.COM
    ip ssh time-out 60
    ip ssh port 2222 rotary 1
    ip ssh source-interface FastEthernet0/0
    ip ssh version 2
    ======================================
    ip access-list extended CISCO
    permit tcp x.x.x.x x.x.x.x any eq 2222
    deny ip any any log
    access-list 101 permit tcp x.x.x.x x.x.x.x any eq telnet
    access-list 101 deny tcp any any eq telnet log
    ==========================================
    line vty 0 4
    access-class 101 in
    exec-timeout 3 0
    password xxxxxxxxxx
    transport input all
    transport output all
    line vty 5 15
    access-class CISCO in
    password xxxxxxxx
    transport input telnet ssh
    transport output telnet ssh
    =====================================

    Were you able to generate a key? If not create a domain-name which is needed to help generate the key
    Router(config) ip domain-name Test.lcl
    Router(config)#crypto key generate rsa
    Lastly you will also need AAA enabled...to enable locally do the following:
    Router (config)# aaa new-model
    Router (config)# username password
    Router (config)# ip ssh time-out
    Router (config)# ip ssh authentication-retries

  • Can no longer connect via ssh

    I've been trying to learn basic networking and have set up a website to upload files to. I've been using ssh in Terminal to do this. Until today I have had no problem connecting and logging into the hosting site and transferring files.
    Now, after I enter my password, ssh does nothing, offers no response, takes no commands.
    Any ideas on what happened and how to remedy this?
    Thanks

    Answered my own question:
    opened another terminal window and used the command killall ssh to abort the previous session.
    Still don't know why it won't login to my server.

  • Fails to connect to SSH Server

    Hi
    I have a IDM-7.1 installation which should connect to a solaris 8 resource running an old ssh server (1.2.31) and when I run a Test Configuration on this resource I get this error message:
    Test connection failed for resource(s):
    Solaris: Could not connect to my.hostname:22: Can't connect to a server with version SSH-1.5-1.2.31
    I guess it is because IDM's ssh client will only talk to SSH2 servers, is there any way of getting it to connect or must I upgrade the SSH server first?
    Regards
    Thomas

    Thomas,
    Upgrading to SSH2 will allow you to integrate fully. Pre-SSH2 versions is not supported by the Solaris adapter.
    The com.waveset.adapter.SolarisResourceAdapter (in other terms the solaris adapter) extends the SVIDResourceAdapter which implements ScriptedConnection. ScriptedConnection leverages Appgates ssh2 package. More information about the ssh2 package can be found : http://www.appgate.com/products/80_MindTerm/80_API_Documentation/com/mindbright/ssh2/package-summary.html
    Now, the good news is that there is an ssh1 package available so by writing your own addition to the standard code you should be able to leverage the ssh1 package part of the com.mindbright packages.
    So if you are forced to integrate using SSH1.5 - write some additional code to do it, else upgrade the SSH daemon to an SSH2 compatible daemon. The latter is to my opinion good decision anyway.
    Anyway, thats my 2 cents..
    /Anders

  • Jconsole - remote connection thru ssh-tunnel

    Hi all,
    I need to start jconsole on my windows-box and connect to a remote tomcat-server thru an ssh-tunnel.
    I have walked thru various posts and blogs, but finally couldn't get it running.
    On the linux-server, I have set the following JAVA_OPTS:
    export JAVA_OPTS='-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8888 -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.useLocalHostname=true -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=myserver'myserver is the server-name that is resolved by the hostname-command. I also tried using localhost instead.
    On the client I run the following ssh-command to create the tunnel:
    ssh tomcat@myserver -L8888:myserver:8888 -N -vWhen I try to create a remote connection with jconsole using localhost:8888, I see the following output by ssh:
    debug1: Connection to port 8888 forwarding to myserver port 8888 requested.
    debug1: channel 1: new [direct-tcpip]
    debug1: channel 1: free: direct-tcpip: listening port 8888 for myserver port 8888, connect from 127.0.0.1 port 1618, nchannels 2It looks not too bad to me, but unfortunately, jconsole runs into a timeout after about 2 mins.
    On the server I see the following using netstat:
    tcp        0    168 myserver:ssh    mywindowsbox:3381  VERBUNDEN  
    tcp        0      0 myserver:ssh    mywindowsbox:1317  VERBUNDEN  
    tcp        0      0 myserver:44625  myserver:8888   TIME_WAIT  
    tcp        0      0 *:8888                      *:*                         LISTENIt appears to me that the tomcat-server is listening correctly on port 8888 for all incoming hosts (although localhost should be enough).
    Furthermore, it seems that the ssh-tunnel has been establised.
    Why the hell, jconsole still can't connect?

    Hiya.
    JMX connections use two ports. You need the RMI Registry and the RMI Stub. This first one you bound to port 8888, but the other one is probably still bound to a random port. You need to be able to access that one through SSH as well.
    Trouble is that the second port uses a random port and most application servers can't statically configure this one. See this article for possible solutions (be sure to read the follow ups as well) : http://blogs.sun.com/jmxetc/entry/connecting_through_firewall_using_jmx
    Cheers,
    Hugp

  • Connection hange while trying to connect via ssh.

    Hi all,
    I have this problem and i fixed it, just wanted to understand the logic behiend it.
    I tried to login to a machine via ssh.
    After providing the username and password, the connection hang until you press CTRL -C.
    I checked DNS configuration, and some other stuff.
    The problem was a NFS entry in the vfstab that was unreachable.
    When i removed it, the connection went smoothlly.
    My question is, why that entry caused that problem ?
    Thanks!

    At login, the shell runs 'quota -v' to display any over-quota conditions that might exist.
    If the NFS mount was not mounted with "noquta", then it will send an RPC request to the server. If the server is down, that request will take 60 seconds to time out. If you have multiple mounts to the server, they might run sequentially.
    The login should complete after a minute or so, but most users won't wait that long.
    Darren

  • Proper way to Connect to Automatically Connect to SSH Server

    What is the proper way to automatically connect to an ssh server via applescript?
    I've tried a variety of different things, none of them seemed to have worked yet... I've searched Google for quite awhile, and was wondering if anyone could please shed some light.
    1. do shell script "ssh user@hostname"
    Error Msg: Pseudo-terminal will not be allocated because stdin in not a terminal
    2. do shell script "ssh -t -t user@hostname"
    Error Msg: None; However it doesn't allow me to put a password in
    3. do shell script "ssh user@hostname > /dev/null &"
    Error Msg: None; Same as above
    4. tell application "Terminal"
    do script "stty -echo"
    do script "ssh user@hostname"
    end tell
    Error Msg: None. Popups a terminal window for user to enter password
    I've been using password prompt box, for the user to enter a password and would like a way to pass it directly to ssh terminal running in the background.
    I've also though about using SSH RSA keypairs the only way to accomplish this (no login regquired) but would prefer to use user/password authentication rather than trusted RSA keypairs.

    I am trying to setup an automated port forward through ssh -L and run it in the background for someone who has no idea what ssh is..
    Then either Terminal.app or private keys are your option.
    Could you shed some light on why RSA private keys are more secure? Because can't they be used by any user on that machine?
    Not unless you set it up wrong.
    SSH keys require two matching pieces of information - a private key (normally stored in the .ssh directory in your home directory) and a matching public key stored in the authorized_keys file in the .ssh directory of the home directory of the account you're logging in as.
    These two pieces of data have to match and since they're in the home directories of the respective accounts, they are only accessible to the specific user and not everyone.
    Whereas password authentication requires it to typed in.
    And if it's wrong (e.g. a hacker guesses incorrectly) he can try again, and again, and again until he either gets bored (not likely since he's probably using an automated script anyway) or he gets lucky and gets in.
    People are notoriously bad at selecting passwords. All too often passwords are weak and can be broken via simple dictionary attacks (try combinations of common dictionary words) or social engineering techniques. Public keys cannot be broken in such way (or, at least, the brute force attack is estimated to take the average hacker several years to break through).
    There are also trojan keylogger applications (more common on Windows, of course) - these have the ability to record every keystroke made on the system, which makes it easy to capture someone's password any time they type it.

  • Manually connecting POP server via telnet command

    How do I manually telnet to my POP (Post Office Protocol) server to check
    if my mail server is accepting connections?
    <P>
    This method of manually connecting to the mail server is sometimes
    necessary in order to help better troubleshoot Messaging/Mail issues.
    By directly telneting to the POP server, you can determine if the problem is
    within the client software or the server. Following is a list of commands to be
    executed from the UNIX command line or DOS shell using the telnet utility:
    <P>
    Telnetting to port 110 (the POP port).
    telnet machine 110
    POP commands:
    USER uid Log in as "uid"
    PASS password Substitue "password" for your actual password
    STAT List number of messages, total mailbox size
    LIST List messages and sizes
    RETR n Show message n
    DELE n Mark message n for deletion
    RSET Undo any changes
    QUIT Logout (expunges messages if no RSET)
    More commands (and the entire spec) are available at
    http://www.imc.org/rfc1939.

    Hi Helmut,
    I am not sure about the command line client. However you can check-in the activities of other users using the process below:
    1. Login to this URL http://hots:port/dtr/system-tools/reports/ActivityQuery
    2. The user id should have administrator's right.
    3. On the selection screen enter the user who's activities you want to check-in.
    4. Select one of the activity that is listed by clicking on it.
    5. On the page towards the top right hand corner you will have the drop down with one option to check-in the activity. This is only available to admin user.
    Hope this helps.
    Regards
    Sidharth
    Message was edited by: Sidharth Deshpande

  • Allowing other users to connect via SSH and using X apps.

    My computer starts ssh as daemon and I can connect from other workstations, but I can't use ssh -X to use X apps.
    I usually do not need it, but when I do it is pretty annoying.
    I can connect to the university computer and use X apps, but I can't connect from uni to home... :S

    I just did this on the machine you have sshed into you want to set the DISPLAY variable to 192.168.1.5:0
    So if using bash it should be DISPLAY=192.168.1.5:0
    The ip address being the address of your computer that you trying to run the X apps on.
    I also believe you have to run xhost +
    So to sum it up:
    xhost +
    DISPLAY=192.168.1.5:0
    ssh -X ezzetabi@remotemachine

  • I can not connect via SSH to a MacBook (the internal home network)

    Hi all! There is an internal home network of three computers and Wi-Fi router. On the router and the computers with Win7 via SSH I go (with a MacBook) without problems, but on a MacBook with any other computer can not enter via SSH. What could be wrong?

    ssh -v -v -v [email protected]
    Do this once for a working system,
    And once for a broken system.
    Compare the output and see what is says where the broken system changes radically from the working system.
    Also on the destination system look in the /var/log/secure.log file for sshd entries to see if the destination system is rejecting your connection and for what reason.
    It is possible on the destination system to get even more information by changing the /etc/sshd_config file entry
    #LogLevel INFO
    to
    LogLevel DEBUG3
    then issue the command
    sudo kill -HUP  `/var/run/sshd.pid`  # reload sshd configuration parameters

Maybe you are looking for