add hostname to ssh config map
This commit is contained in:
1 parent
eefdb667d5
commit
dfca18db02
1 file changed
+8
@@ -253,6 +253,10 @@ impl Config {
|
||||
}
|
||||
}
|
||||
|
||||
result
|
||||
.entry("hostname".to_string())
|
||||
.or_insert_with(|| host.to_string());
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
@@ -444,6 +448,7 @@ Config {
|
||||
opts,
|
||||
r#"
|
||||
{
|
||||
"hostname": "random",
|
||||
"something": "first",
|
||||
}
|
||||
"#
|
||||
@@ -455,6 +460,7 @@ Config {
|
||||
r#"
|
||||
{
|
||||
"fowardagent": "yes",
|
||||
"hostname": "192.168.1.8",
|
||||
"identityfile": "/home/me/.ssh/id_pub.dsa",
|
||||
"something": "first",
|
||||
}
|
||||
@@ -466,6 +472,7 @@ Config {
|
||||
opts,
|
||||
r#"
|
||||
{
|
||||
"hostname": "a.b",
|
||||
"something": "first",
|
||||
}
|
||||
"#
|
||||
@@ -477,6 +484,7 @@ Config {
|
||||
r#"
|
||||
{
|
||||
"forwardagent": "no",
|
||||
"hostname": "b.b",
|
||||
"identityagent": "/home/me/.ssh/agent",
|
||||
"something": "first",
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user