0

Ok, I don't even know how to put this into words. I have a /dev/myDevice which automatically connects to some ssh server when opened.
How do I connect to it with ssh? Is this even sane?
If it's insane just tell me. this is me getting bored with virtual machines, nothing on no ones production server.

EDIT:
the client is a debian virtual machine. trying with serial console(ttyS*) and qemu tcp connections.

closed as unclear what you're asking by Michael Homer, cuonglm, jimmij, roaima, Archemar Jul 26 '15 at 13:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • FWIW, I think this may add an additional layer of security in ssh servers(this is client) if I can implement it the right way because it lowers the risk of privilege escalation exploits. – Behrooz Jul 25 '15 at 22:58
  • 2
    Are you saying "I have this", or are you asking "Could I create this?  What would happen if I did?" If you have it, what system do you have it on, and what has your prior independent search of its documentation told you? If you're hypothesizing it, tell us more about what you're thinking. Please do not respond in comments; edit your question to make it clearer. – Scott Jul 26 '15 at 5:50
  • @Scott "I have this" – Behrooz Jul 26 '15 at 6:14
  • 1
    Please edit your question to explain how you ended up with a /dev/myDevice which automatically connects to some ssh server when opened. – roaima Jul 26 '15 at 12:51
  • I no understand dis, dis shoold be klozed. nice job guys, well done. – Behrooz Jul 26 '15 at 14:08
1

That device looks much like net redirection in bash, for example /dev/tcp/server/22. On Ubuntu 15.04, I could ssh over such a device by putting the following lines in ~/.ssh/config, then running ssh xyz.

Host xyz
ProxyCommand bash -c 'exec 3<>/dev/tcp/server/22; cat <&3 & cat >&3'

Could you try this with replacing /dev/tcp/server/22 with /dev/myDevice? I'm not sure this also works for ptys or devices with the line discipline.

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