The running Linux VM vm1 has an IP address and sshd configured.
An administrator should log in over the normal network path.
Which method is appropriate?
A VM with networking and SSH can be accessed like a physical host by connecting to its guest IP address.
Detailed explanation
Incorrect. Destroying the VM would stop it rather than provide a login path.
Incorrect. Destroying the VM would stop it rather than provide a login path.
Incorrect. A VM is not a container image for docker run.
Incorrect. A VM is not a container image for docker run.
Incorrect. The host's /proc is not a direct guest shell.
Incorrect. The host's /proc is not a direct guest shell.
Correct. ssh user@address connects through the VM's configured network.
Correct. ssh user@address connects through the VM's configured network.
Try it yourself
An example you can run in a temporary verification environment.
ssh -G user@192.0.2.10 | head -n 5Expected result
接続せずに解決済みSSH設定を表示するKey points
- VM networking
- SSH login
- Difference from console
Notes
- Environment: OpenSSH client。文書用TEST-NET addressを使用
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.