[clug] ssh to box, run shell command, then leave shell open?

Duncan Roe duncan_roe at acslink.net.au
Thu May 5 04:39:21 MDT 2011


I think this should fix it for you:

  bind "\C-l":clear-screen

At the bash prompt, type "help bind" for more information.

AFAICS, "bind -p" does *not* provide output in a form that can be reused as
input: you need to remove the space after the colon. YMMV - I have bash version
4.1.7(2)-release - yours may differ.

Cheers ... Duncan.

On Thu, May 05, 2011 at 10:32:25AM +1000, Carlo Hamalainen wrote:
> On Thu, May 5, 2011 at 10:09 AM, Kevin Pulo <kev at pulo.com.au> wrote:
> > I would have thought that the simplest solution along these lines is
> >
> > ?? ??ssh -t foo at wherever bash --rcfile .bash_special
> >
> > which will log in (with a tty, so -i isn't needed), and then source
> > .bash_special out of the remote account's home directory.
>
> This does work but with one strange side-effect: ctrl-L doesn't work
> anymore for clearing the screen. It just prints ^L. I've Googled a bit
> but I can't work out how to turn that back on.
>
> --
> Carlo Hamalainen
> http://carlo-hamalainen.net
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
>

--
 Please avoid sending me Word or PowerPoint attachments.
 See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the linux mailing list