Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often ssh into my machine from my work PC. At first I log in with a password, but then I realised it is pretty risky, as the sysOp could have been logging what I type all way long.

So I decided to try disposable passwords (OTPW): I always carry with me a sheet of paper with those disposable passwords; when the need arises I can log via ssh to my machine with them.

I understand that it is always risky to use a compromised machine for sshing (and as I don't own this work pc, it can safely be assumed compromised), but I was trying to assess more precisely such risks.

So the question is: what methods could an evil sysAdmin use to access my personal data, given this setup?. I thought of:

- *log what is displayed in my monitor*: I seldom ssh to get personal info. More often
  is because I know the tools on my *nix machine better than my tools on my work pc
  (vim, ghc, newsbeuter, mutt)

- steal and make a copy of my paper sheet: I keep count of the number of times I log
  via 'paper password', and made .bashrc display it at every ssh login, so I would at 
  least know that my machine has been compromised

- beat the crap out of me

- ...
share|improve this question

closed as off topic by ceejayoz, Jenny D, Bryan, Iain Apr 8 '13 at 21:01

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You dont mention what the O/S the client is (might not matter anyway). The sysOp could simply kick you out of your terminal and take control of the terminal you ssh'd in, there is no need to know your password. A relatively low-tech means of doing this would be to change your password on the host you are on, then lock the screen on your terminal. – Matthew Ife Apr 8 '13 at 18:24
as the sysOp could have been logging what I type all way long. You do realise we're the sysops ? – Iain Apr 8 '13 at 21:01

He can still log your (one time) password as you type it, interrupt the connection so you never use it and then use it himself.

He might have done this years ago and still have a backdoor into your system and he's just laughing at your one-time password attempts.

If you don't trust a machine, don't use it for anything sensitive.

share|improve this answer
No. As the OTPW manual specifies, if a login is happening concurrently with another one, the second one will be asked three one time passwords. Also, as I specified, I keep count of the number of one time password used, and the shell prompts it to me every time I successfully log in (i.e.: I would at least be able to detect the infraction) – Erentino Apr 8 '13 at 18:22
The linked mitigations in the manual contain two problems: 1. The attacker doesn't create a simultaneous parallel connection, he just uses yours. Think of it as taking over your keyboard electronically after you have logged in. You will see an apparent disconnect. 2. He assumes that "tens of thousands of connections" is infeasible. It's not. – Ladadadada Apr 8 '13 at 18:37

Anything you store unencrypted on a machine is vulnerable if anyone else has Admin control. This includes your ssh keys and whatnot. Even if you encrypt your personal data, if you unencrypt it on the remote machine, an Admin could, in theory, see it in memory in unencrypted form. All you can safely do with an untrusted machine is use it to store encrypted data.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.