spring_reference/V. Spring Boot Actuator/43.1. Connecting to the rem...

1.1 KiB
Raw Permalink Blame History

43.1. 连接远程shell

默认情况下远程shell监听端口2000以等待连接。默认用户名为user密码为随机生成的并且在输出日志中会显示。如果应用使用Spring Security该shell默认使用[相同的配置](../IV. Spring Boot features/27. Security.md)。如果不是,将使用一个简单的认证策略,你可能会看到类似这样的信息:

Using default password for shell access: ec03e16c-4cf4-49ee-b745-7c8255c1dd7e

Linux和OSX用户可以使用ssh连接远程shellWindows用户可以下载并安装PuTTY

$ ssh -p 2000 user@localhost

user@localhost's password:
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::  (v1.3.0.BUILD-SNAPSHOT) on myhost

输入help可以获取一系列命令的帮助。Spring boot提供metricsbeansautoconfigendpoint命令。