/Library/LaunchAgents/com.xxxx.jenkins.autosshd.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.xxxx.jenkins.autosshd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/Cellar/autossh/1.4f/bin/autossh</string>
<string>-M</string>
<string>5678</string>
<string>-NR</string>
<string>8081:localhost:8080</string>
<string>username@xxx.xxx.xxx.xxx</string>
</array>
<key>KeepAlive</key>
<true/>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
iMac建立到服务器的反向ssh
最新推荐文章于 2025-06-16 15:23:41 发布
本文介绍如何通过plist文件配置Autossh服务,实现SSH连接的自动维持与重启。具体包括设置服务标签、指定Autossh路径及参数、确保服务运行时自动启动等。
521

被折叠的 条评论
为什么被折叠?



