Use Autossh to implement the method of creating SSH tunnel on boot and shell script.

Source: Internet
Author: User


Sometimes back to SSH tunnel, the manual use of SSH to create these is not too big a problem, but if you try to boot, write a shell script and run the script in Rc.local is not successful, the reason is not known.

Later discovered autossh this thing, not only can create SSH tunnel silent mode can also set automatic detection, and automatically try to link the options.


The script that is provided in the attachment of this article needs to be placed in the/etc/ini.d/directory and modified with chmod +x permissions. It is then also necessary to use UPDATE-RC.D service defaults to add the boot service to the boot.

Of course, don't forget to modify the configuration information in the script.

You can then automatically create SSH tunnel at boot time. Enjoy it.



This article is from the "EIT Tramp" blog, please be sure to keep this source http://zicowarn.blog.51cto.com/3815716/1653601

Use Autossh to implement the method of creating SSH tunnel on boot and shell script.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.