Carl Johnson on 28 Oct 2015 11:03:55 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] some bash help


I am using a openVPN that runs on another box. that's what gets me to serverA. there's no direct path from serverB to the openVPN.

On Wed, Oct 28, 2015 at 1:19 PM, Keith C. Perry <kperry@daotechnologies.com> wrote:
This is very cool but I'm thinking of scale now.  Anymore more than a hand full of servers I that config file points a very important item to management.

Question for you Carl... is there any reason why you are not running a VPN (e.g. OpenVPN) on server A?  Once you have that up, you can then SSH directly to server B or whatever else is on that LAN.  I know it's off topic but I'm curious as to why SSH is being using.

Also, have you thought about doing an SSH VPN?

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Keith C. Perry, MS E.E.


From: "chris" <chris@nortoninc.info>
To: "Philadelphia Linux User's Group Discussion List" <plug@lists.phillylinux.org>
Sent: Wednesday, October 28, 2015 12:55:47 PM
Subject: Re: [PLUG] some bash help

Gavin,

That is fantastic and I intend to steal this for use when ssh'ing into servers from home, since we have to route through a server to get to any others when not on the network.

Very nice.

On Wed, Oct 28, 2015 at 12:51 PM, Gavin W. Burris <bug@wharton.upenn.edu> wrote:
Hi, Carl.

You can do an ssh proxy through an intermediate host.

Put something like this in your ~/.ssh/config file.

Host server-a
       Hostname server-a.carl.net
       User carl
       Port 22
       MACs umac-64@openssh.com
       Ciphers arcfour,blowfish-cbc
Host server-b
       ProxyCommand ssh -W %h:%p server-a
       HostName 192.168.1.123


Then you can just:  ssh server-b

Cheers.

On Wed 10/28/15 12:46PM EDT, Carl Johnson wrote:
> I have a server that I need to use as a transparent jump box to another
> network. What I'd like to do is have a "serveradmin" user be able to SSH
> into "serverA" and automatically be SSH'ed into another server, "serverB".
> If this second ssh session to serverB is killed (i.e. ctrl+c) or dies for
> whatever reason I'd like the original ssh session to serverA to collapse
> too.
>
> How can I do this? Is it even possible? Do I have to do some sort of if
> while true magic in .bashrc or what? Maybe the first server has to look for
> exit codes other than "0"?
>
> I've gotten the easy part done already. I can SSH in as serveradmin but
> while at the login prompt of the second server if I ctrl+c I get dumped
> back into a bash prompt on the first server. What I'd like to do is prevent
> this recursion if possible.

> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


--
Gavin W. Burris
Senior Project Leader for Research Computing
The Wharton School
University of Pennsylvania
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug