show-ssh
limactl show-ssh
显示 SSH 命令行(已弃用;请使用 ssh -F
)
概述
显示 SSH 命令行(已弃用)
警告: ’limactl show-ssh’ 已弃用。 请使用 ‘ssh -F ~/.lima/default/ssh.config lima-default’。
limactl show-ssh [flags] INSTANCE
示例
"cmd" format (default): Full SSH command line
$ limactl show-ssh --format=cmd default
ssh -o IdentityFile="/Users/example/.lima/_config/user" -o User=example -o Hostname=127.0.0.1 -o Port=60022 lima-default
"args" format: Similar to the cmd format but omits "ssh" and the destination address
$ limactl show-ssh --format=args default
-o IdentityFile="/Users/example/.lima/_config/user" -o User=example -o Hostname=127.0.0.1 -o Port=60022
"options" format: SSH option key value pairs
$ limactl show-ssh --format=options default
IdentityFile="/Users/example/.lima/_config/user"
User=example
Hostname=127.0.0.1
Port=60022
"config" format: ~/.ssh/config format
$ limactl show-ssh --format=config default
Host lima-default
IdentityFile "/Users/example/.lima/_config/user "
User example
Hostname 127.0.0.1
Port 60022
To show the config file path:
$ limactl ls --format='{{.SSHConfigFile}}' default
/Users/example/.lima/default/ssh.config
选项
-f, --format string 格式: cmd, args, options, config (default "cmd")
-h, --help help for show-ssh
从父命令继承的选项
--debug 调试模式
--log-format string 设置日志格式 [text, json] (default "text")
--log-level string 设置日志级别 [trace, debug, info, warn, error]
--tty 启用 TUI 交互,如打开编辑器。默认在终端时为 true。自动化时设为 false。
-y, --yes --tty=false 的别名
另请参见
- limactl - Lima: Linux 虚拟机