Date: Tue, 24 Nov 2009 09:34:43 +0100 From: Polytropon <freebsd@edvax.de> To: George Davidovich <freebsd@optimis.net> Cc: Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org Subject: Re: Prompt containing SSH login information Message-ID: <20091124093443.7d37b22c.freebsd@edvax.de> In-Reply-To: <20091124072247.GA95051@marvin.optimis.net> References: <20091124051038.1aef9ade.freebsd@edvax.de> <20091124072247.GA95051@marvin.optimis.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 23 Nov 2009 23:22:47 -0800, George Davidovich <freebsd@optimis.net> wrote: > I'd suggest parsing out w(1), or better yet, making use of environmental > variables instead. The following, for example, are set by ssh: > > SSH_CLIENT > SSH_CONNECTION > SSH_TTY That sounds interesting, I'll research on this further. > Out of curiosity, why are you wanting to do this? Are you chaining > connections and need an analog of SHLVL for ssh connections? Quite. Because most of my systems look uniform (prompt and other things), I'd like to immediately know where I am, especially when I need to "walk" subnet paths (which sometimes is a security requirement - one server that allows SSH from external, all connected clients only allow SSH from local network), so I think it would be good to know what's exactly going on. I think the prompt is the most obvious thing to put those informations, because I'm looking at it anyway. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091124093443.7d37b22c.freebsd>