mutt through ssh - single command?
I'm integrating a remote server into my desktop menus.
First thing I did was putting a .ssh/authorized_keys files so the server will recognize my computer and not ask me for a password. (Yes, this is secure, there's public key cryptography involved.)
Next step, add this to a menu:
command: ssh me@server
[X] run in terminal
Works fine, as expected. But I'd like things to be even a little easier...
command: ssh me@server mutt
[X] run in terminal
That gives me just a blank terminal. So does
ssh me@server 'bash -c mutt'
The reason is that commands run that way are noninteractive, they run in the foreground but are not attached to the terminal. So I try this:
(echo mutt ; cat) | ssh me@server
The result:
Pseudo-terminal will not be allocated because stdin is not a terminal.
Right. It's a pipe, of which the front end is a terminal but ssh doesn't know that and doesn't trust it for one reason or another.
Any ideas about how to avoid typing "mutt"?










forces PTY creation. I had this problem with screen and RTFM.
I did RTFM, but somehow managed to miss that option. Thanks.
Edit: by the way, I think the owner of the server knows who he is, screen would be nice
.
Additional hint: if you use ssh in the way described above, your bash (or other shell configuration) won't be read. This means that if you set the EDITOR environment variable there, you'll get the default editor anyway. Setting it in .ssh/rc won't help either, that script will be executed before the command but the environment variable will be discarded when it finishes (a UNIX security feature). This is the way to do it:
ssh -t me@server 'EDITOR=vim mutt'Screen installed.
Thanks, now I won't need multiple connections when I start trying to get passiflora to run there. But first I need to get it to run on my own box again
.
I rely on a shell box a lot so I worked a lot of things that makes life easier.
I have a screen configuration that gives me a window listing at the bottom.
This screen configuration automatically starts: ssh to my shell, pends for an answer to start a local irssi, pends to start rtorrent, and mc. Each screen window is also named accordinly.
One thing I'd like to do is have a similar configuration on my shell that'll start IRSSI, mutt, and mc. Except I can't figure out how to read from a configuration file and attach if already initiated a previous session.
My current command is:
which is also aliased to:
or if I were to use my local screen configuration file:
I usually use the last two commands, for obvious reasons. If you haven't noticed, I'm a bash power user.