`ssh_config` will use VM name if given for host name [closes GH-332]

This commit is contained in:
Mitchell Hashimoto 2011-07-06 00:18:44 -07:00
parent 9e780606f4
commit 5e2e019b7c
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@
scripts as a string. [GH-395]
- Host only network now properly works on multiple adapters. [GH-365]
- Can now specify owner/group for regular shared folders. [GH-350]
- `ssh_config` host name will use VM name if given. [GH-332]
## 0.7.6 (July 2, 2011)

View File

@ -14,7 +14,7 @@ module Vagrant
vm.ssh.check_key_permissions(vm.env.config.ssh.private_key_path)
$stdout.puts(Util::TemplateRenderer.render("ssh_config", {
:host_key => options[:host] || "vagrant",
:host_key => options[:host] || vm.name || "vagrant",
:ssh_host => vm.env.config.ssh.host,
:ssh_user => vm.env.config.ssh.username,
:ssh_port => vm.ssh.port,