support for limiting ssh between nodes in xdsh -K
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8016 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f4e8bb41af
commit
d468db2019
@ -24,6 +24,7 @@
|
||||
# to the node, or generated and then obtained to send to the
|
||||
# node.
|
||||
# DSH_TO_USERID - The userid on the node where the ssh keys will be updated.
|
||||
# DSH_ENABLE_SSH - Node to node root passwordless ssh will be setup.
|
||||
#
|
||||
# Usage: remoteshell.expect
|
||||
# [-t remote_shell hostname] test the remoteshell on the host
|
||||
@ -216,8 +217,9 @@ if { [llength $argv] != 0 } {
|
||||
exec /bin/kill $pid
|
||||
}
|
||||
}
|
||||
set pid [ spawn $scp $directory/id_rsa $to_userid\@$node:/tmp/$to_userid/.ssh ]
|
||||
expect {
|
||||
if { [info exists env(DSH_ENABLE_SSH)] } {
|
||||
set pid [ spawn $scp $directory/id_rsa $to_userid\@$node:/tmp/$to_userid/.ssh ]
|
||||
expect {
|
||||
"Are you sure you want to continue connecting (yes/no)?" {
|
||||
send "yes\r"
|
||||
exp_continue
|
||||
@ -229,6 +231,7 @@ if { [llength $argv] != 0 } {
|
||||
"Permission denied*" {
|
||||
exec /bin/kill $pid
|
||||
}
|
||||
}
|
||||
}
|
||||
set pid [ spawn $scp $directory/copy.sh $to_userid\@$node:/tmp/$to_userid/.ssh ]
|
||||
expect {
|
||||
|
Loading…
Reference in New Issue
Block a user