I would like to save the keystrokes I make to ssh into a server (with a ssh public key) and tail a log file. What's the easiest way to do this. Is there a shell script that can do this, or if not, a short Ruby script?
+1
A:
Any reason not to use ssh itself ? ssh server "tail logfile" ?
Or if it's more complicated 'expect' is good for scripting interactive commands.
Richard
2010-10-05 14:46:46
+1
A:
You can pass a command to the ssh command, instead of starting a shell. (Just add the command after the hostname)
Then it's easy to setup an alias
for that ssh command.
Douglas Leeder
2010-10-05 14:46:47