- 可用
- It Does Work
Make self happy.
Go to release page, and download the latest binary.
The pre-built binary files are named with fakessh_{version}_{os}_{arch}[_minimal]
.
darwin
os meansmacOS
.amd64
arch meansx86_64
, and it may have suffix likev2
,v3
.v3
means high performance but need CPU microarchitecture support, no suffix meansv1
that can run on nearly all AMD/Intel x86_64 CPUs. See this wikipedia for more information.- There is a binary named
fakessh_{version}_macosuniversal
that is a universal binary of macOS containing all architectures (amd64
,arm64
). - Most of us should use the
minimal
binary. It contains basic features only, but also enough for most users. And some avanced features will be added in the future, may since version0.5.0
.
- configure file
- shell for git server (won't included in
minimal
build) - max connections
- rate limit
- fake shell for log interders' actions (WIP in
0.5.1
) (!minimal) - custom root fs in tar/zip files (WIP in
0.5.2
) (!minimal)
Read this file for information.
Usage of FakeSSH:
-A disable anti honeypot scan
-V show version of this binary
-a enable anti honeypot scan (default)
-bind addr
binding addr (default ":22")
-c path
config path
-config path
config path
-delay int
wait time for each login (ms)
-devia int
deviation for wait time (ms)
-format [plain|json]
log format: [plain|json] (default "plain")
-gen
generate a private key to key file path
-h show this page
-help
show this page
-key path
key file path, can set more than one
-level [debug|info|warning]
log level: [debug|info|warning] (default "info")
-log file
log file
-max maxconn
see maxconn
-maxconn max:loss_ratio:hard_max
max unauthenticated connections in format max:loss_ratio:hard_max, optionalable, see README
-maxsucc maxsuccconn
see maxsuccconn
-maxsuccconn max:loss_rate:hard_max
max success connections in format max:loss_rate:hard_max, see maxconn
-mc maxconn
see maxconn
-msc maxsuccconn
see maxsuccconn
-o option
see option
-option module.key=value
options for modules, "module.key=value"
-passwd
log password to file
-r float
success ratio float percent age (0.0 ~ 100.0, default: 0)
-rate interval:limit
rate limit in format interval:limit
-seed string
success seed (any string)
-try int
max try times (default 3)
-type string
type for generate private key (default "ed25519")
-user user:password
users in format user:password, can set more than one
-version string
ssh server version (default "OpenSSH_9.3p1")
-
The general format is
type:option
, and the option part can leave blank. -
Following types is available:
ed25519
,rsa
,ecdsa
, default ised25519
if it's left empty. -
If key path is not specialed, you can set multi types, separated with
,
. For example,rsa
|rsa:2048
|ecdsa:P256,rsa
|ed25519,ecdsa
are all available, but only the first type set is used for generating mode. -
Option for
rsa
is key size, default is4096
. -
Option for
ecdsa
is curve type, such asP256
,P384
,P521
, and default isP384
.
You can use the commandline option -maxconn
(or shorter -mc
) to set the max connections for unauthenticated connections, the server.max_conn
in configure file does it the same.
And -maxsuccconn
(shorter -msc
or server.max_succ_conn
in configure file) to set the max success connections, with the same syntax.
The format of -maxconn
and -maxsuccconn
is max:loss_ratio:hard_max
, and the format of configure file is shown in this file.
It means when the count of connections reaches max
, the connection will loss in the ratio. The ratio will increase literally, and when connections equal or larger than hard_max
it will reach 1.0
.
max
is interger, optional means0
:max < 0
=> unlimited connections, unlesshard_max
.max = 0
=> use program default value(current is100
formaxconn
and5
formaxsuccconn
).
loss_ratio
is float, optional means0
:loss_ratio < 0
=> not loss connections until it reacheshard_max
.loss_ratio >= 0
=> loss connections with the ratio, and it will increase literally until connections reacheshard_max
.
hard_max
is interger, optional means0
:hard_max <= 0
whenmax < 0
=> unlimited connections.hard_max <= 0
whenmax >= 0
=> it will be the larger value ofmax * 2
and default value(current is65535
formaxconn
and10
formaxsuccconn
).