PDA

View Full Version : open a SSH connection with G6



yonu
March 19th, 2016, 08:52 PM
Is there a way to open a SSH connection using g6 and keep it open? so that commands can be sent through it?

Thanks,
Yonu

yonu
April 2nd, 2016, 12:51 PM
any thoughts on this I know it can be done with telnet but I can't find my notes

Ron
April 2nd, 2016, 01:30 PM
You'd use Putty on Windows or ssh on Linux to create a tunnel then use Girder to connect through the tunnel. Does that make sense?

yonu
April 2nd, 2016, 09:18 PM
Thanks that should work I actually feel stupid for not knowing linux had a ssh command

Thanks,
Yonu

Ron
April 2nd, 2016, 09:53 PM
No problem. SSH tunneling is really great, I use it quite a lot.

yonu
April 3rd, 2016, 08:00 PM
quick question here is what I have so far I am using sshpass so I don't have to deal with keys the command works it I run it in terminal but from from within G6. if there is a simpler way I am missing any advice would be very helpful.

On a side note I would prefer to keep the ssh connection active and simply trigger each command using lua functions unless the response speed of the system is negligible.

os.execute('sshpass -p password ssh -l pi 127.0.0.1 "export DISPLAY=:0 && xdotool key a"')

Thanks,
Yonu