C:\cygwin64\bin\autossh.exe -M 0 -N -R 10022:localhost:22 ServerUser@RemotServer
$ telnet localhost 10022Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.SSH-2.0-OpenSSH_for_Windows_8.6^C^CConnection closed by foreign host.
Microsoft Windows [版本 10.0.22621.2215]
(c) Microsoft Corporation. 著作權所有,並保留一切權利。
user@WINDOWS-DESKTOP C:\Users\user>c:\cygwin64\Cygwin.bat
user@windows-desktop ~
$
user@windows-desktop ~
$ curl -s https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
user@windows-desktop ~
$ chmod 700 ./apt-cyg
user@windows-desktop ~
$ ./apt-cyg
NAME
apt-cyg - package manager utility
SYNOPSIS
apt-cyg [operation] [options] [targets]
DESCRIPTION
apt-cyg is a package management utility that tracks installed packages on a
Cygwin system. Invoking apt-cyg involves specifying an operation with any
potential options and targets to operate on. A target is usually a package
name, file name, URL, or a search string. Targets can be provided as command
line arguments.
OPERATIONS
install
Install package(s).
remove
Remove package(s) from the system.
update
Download a fresh copy of the master package list (setup.ini) from the
server defined in setup.rc.
download
Retrieve package(s) from the server, but do not install/upgrade anything.
show
Display information on given package(s).
depends
Produce a dependency tree for a package.
rdepends
Produce a tree of packages that depend on the named package.
list
Search each locally-installed package for names that match regexp. If no
package names are provided in the command line, all installed packages will
be queried.
listall
This will search each package in the master package list (setup.ini) for
names that match regexp.
category
Display all packages that are members of a named category.
listfiles
List all files owned by a given package. Multiple packages can be specified
on the command line.
search
Search for downloaded packages that own the specified file(s). The path can
be relative or absolute, and one or more files can be specified.
searchall
Search cygwin.com to retrieve file information about packages. The provided
target is considered to be a filename and searchall will return the
package(s) which contain this file.
mirror
Set the mirror; a full URL to a location where the database, packages, and
signatures for this repository can be found. If no URL is provided, display
current mirror.
cache
Set the package cache directory. If a file is not found in cache directory,
it will be downloaded. Unix and Windows forms are accepted, as well as
absolute or regular paths. If no directory is provided, display current
cache.
OPTIONS
--nodeps
Specify this option to skip all dependency checks.
--version
Display version and exit.
00_ssh-reverse-tunnel_openssh-server.bat
C:\cygwin64\bin\autossh.exe -M 0 -N -R 10022:localhost:22 ServerUser@RemotServer
沒有留言:
張貼留言