Live data from Hacker News

Bashhub – Bash History in the Cloud

bashhub.com

21–30 of 49 posts

Re: Bashhub – Bash History in the Cloud

#21

Earlier quoted context omitted.

I'd hope not. What winds up in your bash history? [In case it wasn't clear, above was mildly tongue-in-cheek; secrets should not be in your bash history, but of course things approaching (and including) PII may well be]

If I accidentally hit enter too soon on a sudo command - parts of my password. Also accidental pastes from other windows occasionally.

I expect I might take more care about maintaining a tidy history (see my other comment about splitting out separate histories by context), and reflexively clear bits of my history when I don't want them hanging around in the way of a ctrl-r - which would certainly include bits of passwords and anything pasted.

That said, this seems to use PROMPT_COMMAND to log off history, which would not give the opportunity for such tidying. Worrisome.

Re: Bashhub – Bash History in the Cloud

#22

Earlier quoted context omitted.

I'd hope not. What winds up in your bash history? [In case it wasn't clear, above was mildly tongue-in-cheek; secrets should not be in your bash history, but of course things approaching (and including) PII may well be]

If I accidentally hit enter too soon on a sudo command - parts of my password. Also accidental pastes from other windows occasionally.

alias oops='history -d $((HISTCMD-2)) && history -d $((HISTCMD-1))'

Re: Bashhub – Bash History in the Cloud

#24

Earlier quoted context omitted.

After some experimentation, it makes a file impossible to delete. Very clever, +1.

I wonder if this solves the issue of multiple bash instances clobbering history.

From the bash manpage:

    If the histappend shell option  is  enabled (see  the description of shopt
    under SHELL BUILTIN COMMANDS below), the lines are appended to the history
    file, otherwise the history  file  is overwritten.


    histappend
        If  set,  the history list is appended to the file named
        by the value of the HISTFILE  variable  when  the  shell
        exits, rather than overwriting the file.

Re: Bashhub – Bash History in the Cloud

#25
post #22

Earlier quoted context omitted.

If I accidentally hit enter too soon on a sudo command - parts of my password. Also accidental pastes from other windows occasionally.

alias oops='history -d $((HISTCMD-2)) && history -d $((HISTCMD-1))'

Alas, not helpful here. The logging is done in PROMPT_COMMAND, meaning by the time you can type another command things are already logged and editing your history won't help. Hopefully (though I see no evidence of this, I've also only skimmed the material) things are marshalled somewhere locally and can be inspected/edited before being sent to the server.

Re: Bashhub – Bash History in the Cloud

#26

Earlier quoted context omitted.

The security implications are terrifying.

I'd hope not. What winds up in your bash history? [In case it wasn't clear, above was mildly tongue-in-cheek; secrets should not be in your bash history, but of course things approaching (and including) PII may well be]

Not saying I make of habit of this, but sometimes you have to pass sensitive things as arguments (passwords, api tokens, customer data, etc), it happens.

I think client side encryption by Bashhub would alleviate this security concern.

Re: Bashhub – Bash History in the Cloud

#27

Earlier quoted context omitted.

I'd hope not. What winds up in your bash history? [In case it wasn't clear, above was mildly tongue-in-cheek; secrets should not be in your bash history, but of course things approaching (and including) PII may well be]

Not saying I make of habit of this, but sometimes you have to pass sensitive things as arguments (passwords, api tokens, customer data, etc), it happens. I think client side encryption by Bashhub would alleviate this security concern.

That doesn't have to mean typing it at your command line. My approach is typically to set shell variables with read (if I need to type it) or xclip (if I need to paste).

Of course, client side encryption would be great in any case.

Re: Bashhub – Bash History in the Cloud

#28

Earlier quoted context omitted.

I wonder if this solves the issue of multiple bash instances clobbering history.

From the bash manpage: If the histappend shell option is enabled (see the description of shopt under SHELL BUILTIN COMMANDS below), the lines are appended to the history file, otherwise the history file is overwritten. histappend If set, the history list is appended to the file named by the value of the HISTFILE variable when the shell exits, rather than overwriting the file.

I always seem to get this wrong or forget to set it up in my bashrc. I'll add it to my dotfiles repo, thanks.

Re: Bashhub – Bash History in the Cloud

#29

Earlier quoted context omitted.

I'd hope not. What winds up in your bash history? [In case it wasn't clear, above was mildly tongue-in-cheek; secrets should not be in your bash history, but of course things approaching (and including) PII may well be]

Not saying I make of habit of this, but sometimes you have to pass sensitive things as arguments (passwords, api tokens, customer data, etc), it happens. I think client side encryption by Bashhub would alleviate this security concern.

One of the AWS config utilities comes to mind - you have to paste in your AWS key if running interactively.

Re: Bashhub – Bash History in the Cloud

#30

Earlier quoted context omitted.

If I accidentally hit enter too soon on a sudo command - parts of my password. Also accidental pastes from other windows occasionally.

I expect I might take more care about maintaining a tidy history (see my other comment about splitting out separate histories by context), and reflexively clear bits of my history when I don't want them hanging around in the way of a ctrl-r - which would certainly include bits of passwords and anything pasted. That said, this seems to use PROMPT_COMMAND to log off history, which would not give the opportunity for suc…

I can't see your comment about splitting history - this sounds like something I'd use, though.
Post reply on HN