Showing posts with label putty. Show all posts
Showing posts with label putty. Show all posts

Friday, March 14, 2014

How to connect via SSH (putty) to your vmware machine (Ubuntu) ?

It was really a pain for me to work on Oracle VM, It won't allow you to use mouse or do copy-paste. So I decided to connect my local VM via SSH( Putty).

Steps :

1.  In your VM box, Goto Settings -> Network ->Adapter 1 and select "Bridged Adapter"



2. In your Ubuntu Machine, Install "openssh-server" 
          sudo apt-get install openssh-server

3. Reboot the VM and Run "ifconfig" command in terminal and get "inet addr" of "eth0".

4. Open putty, Enter the IP address(IP of your VM machine ) , Select port as "22" and connection type as "SSH" and click on open button.


5. Enter your credential and you are done :)



Thursday, July 25, 2013

How to do JVM Remote debugging via SSH

Last week I was getting one issue which was difficult to debug as the product was on EC2 instance. We were wasting lot of time as It was difficult to test and check the actual cause of issue.  Later I decided to attach the Eclipse debugger to my target JVM which is running on some different(EC2 instance) machine with the help of PuTTy ( PuTTY is an SSH and telnet client).

Lets start with the steps :

1. Make sure your target JVM is started with these args:
        -agentlib:jdwp=transport=dt_socket,address=8001,server=y,suspend=n
2. Create an SSH session into your PuTTy.
      Open Putty, Add :
        -- IP Address : "YOUR_TARGET_JVM_ADDRESS"
        -- PORT : 22
        -- Saved Sessions : your session name
        -- Choose 'SSH' radio button and Save it.
  
       

  
3. After saving your server detail, in the same putty :
     -- Goto Category -> SSH ->tunnels
     -- source port :7000
     -- Destination : ip:port <eg : 10.0.2.12:8001> 
     -- Click on 'Add' button
     -- Again click on 'session' under category and save it.
     -- Start the session once you are done with above settings by clicking on 'open'  button.
   
 


4 . In Eclipse, Goto Run -> Debug Configuration -> Remote Java Application and Add :
      -- Project : point to your project directory
      -- Choose 'connection type'  as 'Standard (Socket Attach)'
      -- Host : localhost
      -- Port : 7000 (Must be same as source port in PuTTy)
       

   

Now You  are good to go to start with your remote debugging :)

Note : Sometime during Remote Debugging, You might get some error message like "Connection timeout". To fix the issue, Goto : Eclipse - > Windows -> Preferences -> Java ->Debug and set debugger timeout as some higher value.

 Please let me know your comments/feedback, if any.

Tuesday, June 12, 2012

How to configure session timeout for putty

Click on the upper left hand corner of your putty screen, then click on 'Change Settings', then 'Connection'. I have my 'keepalive' set to 300.
Now It will time out after 5 minutes.

How TOPT Works: Generating OTPs Without Internet Connection

Introduction Have you ever wondered how authentication apps like RSA Authenticator generate One-Time Passwords (OTPs) without requiring an i...