[Top][All Lists]

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

Re: ssh in new screen window

From: Chris Henderson
Subject: Re: ssh in new screen window
Date: Tue, 24 Feb 2009 11:51:01 -0800

On Tue, Feb 24, 2009 at 5:50 AM, Andy Harrison <address@hidden> wrote:
> On Tue, Feb 24, 2009 at 12:43 AM, Chris Henderson <address@hidden> wrote:
>> When I SSH to a server, I would like screen to open that SSH
>> connection in a new window and (re)name that window as that server's
>> name. I have seen this done somewhere before using hardstatus but I
>> don't have that config.
> Here's how I prefer to do it.  I use ^A e to turn on the caption line,
> ^A E to shut it off.
> windowlist string "(%3n) %{..g}[%{..Y}%t%{..g}]%{..g}%=%f"
> windowlist title "Num   Name"
> bind E  caption splitonly "%{= Bw} (%2n) %{..g}[%{..Y}%t%{..g}] %{> h}"
> bind e  caption always    "%{= Bw} (%2n) %{..g}[%{..Y}%t%{..g}] %{> h}"
> Then I have a menu script that essentially does things like this:
> screen -t ssh


I have put the following in my .bashrc and it's giving me exactly what I want.

ssh() { screen -t "address@hidden" ssh "$@"; }

BTW, I have ~/.ssh/config file setup with ssh keys and all the options
I need so in
the (bash) prompt all I do is type: ssh <servername> and I get a new screen
window with <servername> as the title.

Out of curiosity: would anyone know what these "address@hidden" ssh "$@"; means?

Thanks again.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]