3 # fixme: assume user is root
7 [[ $mount_needs ]] && return 1
9 # If our prerequisites are not met, fail.
10 require_binaries
ssh scp ||
return 1
12 if [[ $sshkey ]]; then
14 derror
"ssh key: $sshkey is not found!"
24 # We depend on network modules being loaded
30 if [ -d /root
/.
ssh ]; then
32 chmod 700 ${initdir}/root
/.
ssh
35 # Copy over ssh key and knowhosts if needed
38 [[ -f /root
/.ssh
/known_hosts
]] && inst_simple
/root
/.ssh
/known_hosts
39 [[ -f /etc
/ssh
/ssh_known_hosts
]] && inst_simple
/etc
/ssh
/ssh_known_hosts
42 # Copy over root and system-wide ssh configs.
43 [[ -f /root
/.ssh
/config
]] && inst_simple
/root
/.ssh
/config
44 if [[ -f /etc
/ssh
/ssh_config
]]; then
45 inst_simple
/etc
/ssh
/ssh_config
46 sed -i -e 's/\(^[[:space:]]*\)ProxyCommand/\1# ProxyCommand/' ${initdir}/etc
/ssh
/ssh_config
47 while read key val ||
[ -n "$key" ]; do
48 [[ $key != "GlobalKnownHostsFile" ]] && continue
51 done < /etc
/ssh
/ssh_config