$ tryssh -h
command line ssh terminal tool.
Usage:
tryssh [command]
Available Commands:
alias Set, unset, and list aliases, aliases can be used to log in to servers
create Create alternate username, port number, password, and login cache information
delete Delete alternate username, port number, password, and login cache information
get Get alternate username, port number, password, and login cache information
help Help about any command
prune Check if all current caches are available and clear the ones that are not available
scp Upload/Download file to/from the server through SSH protocol
ssh Connect to the server through SSH protocol
version Print the client version information for the current context
Flags:
-h, --help help for tryssh
Use "tryssh [command] --help" for more information about a command.
$ tryssh create -h
Create alternate username, port number, password, and login cache information
Usage:
tryssh create [command]
Available Commands:
caches Create a alternate cache
passwords Create a alternate password
ports Create a alternate port
users Create a alternate username
Flags:
-h, --help help for create
Use "tryssh create [command] --help" for more information about a command.
$ tryssh delete -h
Delete alternate username, port number, password, and login cache information
Usage:
tryssh delete [command]
Available Commands:
caches Delete a alternate cache
passwords Delete a alternate password
ports Delete a alternate port
users Delete a alternate username
Flags:
-h, --help help for delete
Use "tryssh delete [command] --help" for more information about a command.
$ tryssh get -h
Get alternate username, port number, password, and login cache information
Usage:
tryssh get [command]
Available Commands:
caches Get alternate caches by ipAddress
passwords Get alternate passwords
ports Get alternate ports
users Get alternate usernames
Flags:
-h, --help help for get
Use "tryssh get [command] --help" for more information about a command.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
get 使用举例
# 查看用于猜密码的候选用户
tryssh get users
# 查看用于猜密码的候选端口号
tryssh get ports
# 查看当前已有的登陆缓存
tryssh get caches
$ tryssh prune -h
Check if all current caches are available and clear the ones that are not available
Usage:
tryssh prune [flags]
Flags:
-a, --auto Automatically perform concurrent cache optimization without asking for confirmation to delete
-c, --concurrency int Number of multiple requests to perform at a time (default 8)
-h, --help help for prune
-t, --timeout duration SSH timeout when attempting to log in. It can be "1s" or "1m" or other duration (default 2s)
1
2
3
4
5
6
7
8
9
10
11
prune 使用举例
# 交互式进行缓存可用性测试
tryssh prune
# 非交互进行缓存可用性测试
tryssh prune -a
# 非交互进行缓存可用性测试,同时设置并发数为10(默认为8),连接超时时间为5秒(默认为2秒)
tryssh prune -c 10 -t 5s -a
$ tryssh alias -h
Set, unset, and list aliases, aliases can be used to log in to servers
Usage:
tryssh alias [command]
Available Commands:
list List all alias
set Set an alias for the specified server address
unset Unset the alias
Flags:
-h, --help help for alias
Use "tryssh alias [command] --help" for more information about a command.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
alias 使用举例
# 查看当前所有别名
tryssh alias list
# 给192.168.1.1服务器设置一个名为"host1"的别名
tryssh alias set host1 -t 192.168.1.1
# 取消名为"host1"的别名
tryssh alias unset host1
chenjingyu@MacBook ~ % tryssh ssh -h
Connect to the server through SSH protocol
Usage:
tryssh ssh [flags]
Flags:
-c, --concurrency int Number of multiple requests to perform at a time (default 8)
-h, --help help for ssh
-t, --timeout duration SSH timeout when attempting to log in. It can be "1s" or "1m" or other duration (default 1s)
-u, --user string Specify a username to attempt to login to the server,
if the specified username does not exist, try logging in using that username
chenjingyu@MacBook ~ % tryssh scp -h
Upload/Download file to/from the server through SSH protocol
Usage:
tryssh scp [flags]
Examples:
# Download test.txt file from 192.168.1.1 and place it under ./
tryssh scp 192.168.1.1:/root/test.txt ./
# Upload test.txt file to 192.168.1.1 and place it under /root/
tryssh scp ./test.txt 192.168.1.1:/root/
# Download test.txt file from 192.168.1.1 and rename it to test2.txt and place it under ./
tryssh scp 192.168.1.1:/root/test.txt ./test2.txt
# Download testDir directory from 192.168.1.1 and place it under ~/Downloads/
tryssh scp -r 192.168.1.1:/root/testDir ~/Downloads/
# Upload testDir directory to 192.168.1.1 and rename it to testDir2 and place it under /root/
tryssh scp -r ~/Downloads/testDir 192.168.1.1:/root/testDir2
Flags:
-c, --concurrency int Number of multiple requests to perform at a time (default 8)
-h, --help help for scp
-r, --recursive Recursively copy entire directories
-t, --timeout duration SSH timeout when attempting to log in. It can be "1s" or "1m" or other duration (default 1s)
-u, --user string Specify a username to attempt to login to the server,
if the specified username does not exist, try logging in using that username