The solution to use ssh command without using the console(tty) is to add -t -t option. Option can be used for remote/local tunnels also.
Eg : ssh -t -t -R 2222:localhost:22 username@
This will create a pseudo terminal which will login to remote server. So, actual terminal is not engaged by ssh proc, which makes the tunnel more stable & consistent. To add on further check, we can check if ssh proc is running & create new ssh tunnel using shell script with a cron job at hourly interval. Shell script can be changed to reset tunnel every hour using kill $PID & recreate tunnel to insure availability.
For further details check man pages. Such tunnels can be configured to allow remote login to office machine. Feel free to ask if have any query. Sample tunnel script attached with mail.
Further suggestion are welcome !
No comments:
Post a Comment
Comments welcome :