From 5e2e019b7c215e827c73d57c25ffc878a2bb9620 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 6 Jul 2011 00:18:44 -0700 Subject: [PATCH] `ssh_config` will use VM name if given for host name [closes GH-332] --- CHANGELOG.md | 1 + lib/vagrant/command/ssh_config.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac70a3d23..7f61e8957 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/lib/vagrant/command/ssh_config.rb b/lib/vagrant/command/ssh_config.rb index cc171ed4b..25124312f 100644 --- a/lib/vagrant/command/ssh_config.rb +++ b/lib/vagrant/command/ssh_config.rb @@ -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,