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.

5
  • 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. Commented Jul 25, 2015 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. Commented Jul 26, 2015 at 5:50
  • @Scott "I have this" Commented Jul 26, 2015 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. Commented Jul 26, 2015 at 12:51
  • I no understand dis, dis shoold be klozed. nice job guys, well done. Commented Jul 26, 2015 at 14:08

1 Answer 1

2

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.