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

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

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...