Showing posts with label tunnel. Show all posts
Showing posts with label tunnel. Show all posts

Tuesday, 12 February 2019

Connection with Jedis to passworded, "in-transit" encrypted AWS Elasticache Redis instance


import redis.clients.jedis.Jedis;

public class RedisStringJava {
   public static void main(String[] args) {
      Jedis jedis = new Jedis("master.redis-poc-single-01.eeeeee.use1.cache.amazonaws.com", 6379, true);
      jedis.auth("mypassword");
      System.out.println("Connection to server sucessfully");
      jedis.set("tutorial-name", "Redis tutorialz");
      // Get the stored data and print it
      System.out.println("Stored string in redis:: "+ jedis.get("tutorial-name"));
   }
}

Wednesday, 29 May 2013

Direct ssh to a server via proxy using putty/plink on Windows


  1. Make sure seamless ssh keys are setup to your bastion server for your username
    1. Not covered here
    2. See: http://www.ualberta.ca/CNS/RESEARCH/LinuxClusters/pka-putty.html
  2. Session -> Host Name -> mytargetserver.mydomain.com
  3. Connection -> Proxy
    1. Proxy Type -> Local
    2. Telnet command, or local proxy command 
      1. c:/program files (x86)/putty/plink.exe myproxy.mydomain.com -l myusername -agent -nc %host:%port
        1. adjust this path to plink.exe to match your local setup
          1. hint: install the complete putty install package, not just putty
  4. Tunnels
    1.   L8081 mytargetserver.mydomain.com:8081
Hint: always hit "Save", no matter what you do, or however inconvenient it was designed to be.

Another example: plink -L 127.0.0.1:1433:mysqlserver.com:1433 admin@google.com -i myprivkeyfile

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...