为什么 Autossh 在 Ubuntu 上可以工作,但在 Antergos 上却不行?

为什么 Autossh 在 Ubuntu 上可以工作,但在 Antergos 上却不行?

这是我第一次尝试超越 Ubuntu,并选择 Antergos 来轻松进入更广阔的 Linux 世界。一切都很顺利,pacman 也越来越熟悉,但 autossh 似乎遇到了问题:

关于安特戈斯:

[tbrowne@redbrix1 ~]$ autossh -p 52222 [email protected]
usage: autossh [-V] [-M monitor_port[:echo_port]] [-f] [SSH_OPTIONS]

    -M specifies monitor port. May be overridden by environment
       variable AUTOSSH_PORT. 0 turns monitoring loop off.
       Alternatively, a port for an echo service on the remote
       machine may be specified. (Normally port 7.)
    -f run in background (autossh handles this, and does not
       pass it to ssh.)
    -V print autossh version and exit.

Environment variables are:
    AUTOSSH_GATETIME    - how long must an ssh session be established
                          before we decide it really was established
                          (in seconds). Default is 30 seconds; use of -f
                          flag sets this to 0.
    AUTOSSH_LOGFILE     - file to log to (default is to use the syslog
                          facility)
    AUTOSSH_LOGLEVEL    - level of log verbosity
    AUTOSSH_MAXLIFETIME - set the maximum time to live (seconds)
    AUTOSSH_MAXSTART    - max times to restart (default is no limit)
    AUTOSSH_MESSAGE     - message to append to echo string (max 64 bytes)
    AUTOSSH_PATH        - path to ssh if not default
    AUTOSSH_PIDFILE     - write pid to this file
    AUTOSSH_POLL        - how often to check the connection (seconds)
    AUTOSSH_FIRST_POLL  - time before first connection check (seconds)
    AUTOSSH_PORT        - port to use for monitor connection
    AUTOSSH_DEBUG       - turn logging to maximum verbosity and log to
                          stderr

[tbrowne@redbrix1 ~]$ 

在 Ubuntu 16.04 上:

tbrowne@calculon:~$ autossh -p 52222 [email protected]
  ____      _     _      _                   _    
 / ___|   _| |__ (_) ___| |_ _ __ _   _  ___| | __
| |  | | | | '_ \| |/ _ \ __| '__| | | |/ __| |/ /
| |__| |_| | |_) | |  __/ |_| |  | |_| | (__|   < 
 \____\__,_|_.__/|_|\___|\__|_|   \__,_|\___|_|\_\


Welcome to ARMBIAN 5.31 stable Debian GNU/Linux 8 (jessie) 4.11.6-sunxi   
System load:   0.05 0.05 0.01   Up time:       1 day        
Memory usage:  17 % of 2012MB   IP:            192.168.1.192
CPU temp:      37°C             HDD temp:      30°C             
Usage of /:    7% of 110G       storage/:      7% of 110G       

[ 0 security updates available, 2 updates total: apt upgrade ]
Last check: 2017-08-30 00:00

[ General system configuration: armbian-config ]
Last login: Wed Aug 30 15:21:31 2017 from 83-244-211-54.cust-83.exponential-e.net
                    ____
      ___======____=---=)
    /T            \_--===)
    [ \ (0)   \~    \_-==)
     \      / )J~~    \-=)
      \\___/  )JJ~~~   \)
       \_____/JJJ~~~~    \
       / \  , \J~~~~~     \
      (-\)\=|\\\~~~~       L__
      (\\)  (\\\)_           \==__
       \V    \\\) ===_____   \\\\\\
              \V)     \_) \\\\JJ\J\)
                          /J\JT\JJJJ)
                          (JJJ| \UUU)
                           (UU)
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
tbrowne@cubietruck ~> 

我想使用 autossh 创建反向端口转发,但每当我尝试使用它时,它似乎都会给我一个语法错误。

我在两者上都使用 autossh 1.4e。普通的旧(非自动)ssh 在两者上都可以正常工作。这是怎么回事?

相关内容