190
42
I accidentally typed my password into bash command line, mistaking the Last login: ...
line for Wrong password
(I was in a hurry). What do I do to cover my trace?
What I did was editing .bash_history
and deleting the offending line (had to relogin once to see the password appear in the file so I could delete it, and relogin again to see it disappear from the history available under UPARROW key).
Is there any other place where the command history could be saved? The system is CentOS 6.5.
59Just change the password :) – gronostaj – 2014-04-02T07:18:39.510
96Changing the password is not so simple... I'd need to ask the admin to reinstall my new public key on 15 different servers - and the guy is like
/dev/null
. – MaDa – 2014-04-02T08:39:22.08071If you can't change your password easily at any time, then you may have a serious security loophole. What will you do when someone actually gets your password? Do you have any means to immediately revoke system access? – gronostaj – 2014-04-02T13:57:04.217
2
Possible duplicate: http://superuser.com/questions/173118/removing-previously-type-commands-at-a-remote-server
– Excellll – 2014-04-02T14:17:45.24042You can change the passphrase of an ssh key without changing the key:
ssh-keygen -f id_rsa -p
. – jwg – 2014-04-02T14:21:20.237Make sure that your editor didn't leave an auto-backup (often hidden) or somehow keep it in the editor's command history. Of course, all these places where it could be logged should only be readable by your user anyway. – Nick Matteo – 2014-04-02T16:09:49.777
This must be a duplicate, because I know I've commented on a question like this in the past admitting that this kind of thing is the #1 cause of me changing my password. – Ben Jackson – 2014-04-02T20:31:22.793
2I often write my password right next to my login id, because Enter didn't work... leaves my staring at the password prompt. – Jonny – 2014-04-03T04:44:30.377
6Just dropping in to mention that, at least under networked Windows logins, you're hosed. The admin (in some lofty server tower) default is to record all login attempts, and of course the usernames are cleartext. All some enterprising person has to do is search for non-username-ish strings and correlate them with the next valid username (or next login attempt on the same machine). And there's no simple way to delete that admin log file. So ya really gotta change your password. – Carl Witthoft – 2014-04-03T14:31:25.327
btw: You should be able to install a new SSH key on your own by using your old one. – Squeezy – 2014-04-03T20:18:26.687
1
@CarlWitthoft's comment, see: http://security.stackexchange.com/q/14907/9086
– Matt – 2014-04-04T18:28:09.9831Also: if at all possible, do not put ssh keys on remote hosts. Keep them on your client systems (ideally, one per device), and use agent forwarding as necessary. – mattdm – 2014-04-05T07:05:20.037