Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Let the machine do the dirty work. -- "Elements of Programming Style", Kernighan and Ritchie


computers / comp.security.ssh / How to use PUTTY command line to connect a specific server through a bastion server?

SubjectAuthor
* How to use PUTTY command line to connect a specific server through amaurodelgadillo
`- Re: How to use PUTTY command line to connect a specific serverGrant Taylor

1
Subject: How to use PUTTY command line to connect a specific server through a bastion server?
From: maurodel...@gmail.com
Newsgroups: comp.security.ssh
Date: Thu, 24 Oct 2019 21:15 UTC
X-Received: by 2002:a0c:ee49:: with SMTP id m9mr3522814qvs.118.1571951710051;
Thu, 24 Oct 2019 14:15:10 -0700 (PDT)
X-Received: by 2002:a05:6214:1427:: with SMTP id o7mr4307801qvx.83.1571951709779;
Thu, 24 Oct 2019 14:15:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!h21no3037773qto.0!news-out.google.com!m23ni268qtg.1!nntp.google.com!h21no3037764qto.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.security.ssh
Date: Thu, 24 Oct 2019 14:15:09 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.225.34.109;
posting-account=g4T4fAoAAAC37e0_y0wl0IQ67jwZe0aF
NNTP-Posting-Host: 165.225.34.109
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0ab328e5-1aed-44fd-9bad-982b8add7996@googlegroups.com>
Subject: How to use PUTTY command line to connect a specific server through a
bastion server?
From: maurodel...@gmail.com
Injection-Date: Thu, 24 Oct 2019 21:15:10 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Hi,
Does anyone know how to connect to a specific server through a bastion server (putty configuration saved) using Putty command line?

I've already connected this way using the GUI like this https://superuser.com/questions/360351/can-i-tell-putty-to-connect-to-one-ssh-server-then-automatically-to-another/360356

In Putty log there is the next command when I use GUI:
Event Log: Starting local proxy command: plink "bastionServer" -agent -nc 192.168.10.10:22


I've tried to do the same in command line, but the documentation related to putty command line has not examples.


Subject: Re: How to use PUTTY command line to connect a specific server through a bastion server?
From: Grant Taylor
Newsgroups: comp.security.ssh
Organization: TNet Consulting
Date: Fri, 15 Nov 2019 18:11 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED!not-for-mail
From: gtay...@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.security.ssh
Subject: Re: How to use PUTTY command line to connect a specific server
through a bastion server?
Date: Fri, 15 Nov 2019 11:11:04 -0700
Organization: TNet Consulting
Lines: 48
Message-ID: <qqmpom$3hl$1@tncsrv09.home.tnetconsulting.net>
References: <0ab328e5-1aed-44fd-9bad-982b8add7996@googlegroups.com>
NNTP-Posting-Host: alpha.home.tnetconsulting.net
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: tncsrv09.home.tnetconsulting.net 1573841494 3637 198.18.18.251 (15 Nov 2019 18:11:34 GMT)
X-Complaints-To: newsmaster@tnetconsulting.net
NNTP-Posting-Date: Fri, 15 Nov 2019 18:11:34 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101
Thunderbird/68.2.2
In-Reply-To: <0ab328e5-1aed-44fd-9bad-982b8add7996@googlegroups.com>
Content-Language: en-US
View all headers
On 10/24/19 3:15 PM, maurodelgadillo@gmail.com wrote:
Hi,

Hi,

Does anyone know how to connect to a specific server through a bastion server (putty configuration saved) using Putty command line?

I can't tell you /how/ to do this because I've not done it in a LONG time.  But I do believe there is a way to do this.

I /think/ it involves using plink (?) as part of the solution.  If memory serves, sometimes it doesn't, you need to tell PuTTY to use an external command to establish the connection to be used for the session.   I believe plink has the ability to connect to the bastion host and run a command that connects to the SSH daemon behind the bastion.

I've already connected this way using the GUI like this https://superuser.com/questions/360351/can-i-tell-putty-to-connect-to-one-ssh-server-then-automatically-to-another/360356

That looks like it's saying what I've said above, but with a lot more details and screenshots.

That makes me wonder if you are asking how to get PuTTY to do this from the command line.  Yes, I think you can, in a manner of speaking.

I think  you need to specify all of the configuration parameters in the GUI, save it as a profile, and then tell PuTTY to use said profile via the command line.

Sorry, I don't remember the syntax to do this.

In Putty log there is the next command when I use GUI: Event Log: Starting local proxy command: plink "bastionServer" -agent -nc 192.168.10.10:22

I've tried to do the same in command line, but the documentation related to putty command line has not examples.

I don't know if you can completely specify all the parameters on the command line.  I think some of the must be saved in the connection profile and then reference said connection profile on the command line.



--
Grant. . . .
unix || die


1

rocksolid light 0.8.3
clearneti2ptor