我正在远程运行一些命令VM
。在我的脚本中使用sshpass
,但在脚本执行后我无法退出会话。它只是挂在远程屏幕上(见下文)
//script code
sshpass -p admin sh -T admin@10.10.10.X
ssh pass -p admin ssh -o StrictHostKeyChecking=no admin@10.10.10.X
----
<some more remote command>
end of script
----
//script execution
ansible-playbooks/roles/DCN-VSC/files# ./vsc_ops.sh admin 10.10.10.X 10.10.10.25 10.10.10.25 vsc:password@vsd.helion.org
XXXXXXXXXXX-76 cpm/i386 VSX Copyright (c) 2000-2015
All rights reserved. All use subject to applicable license agreements.
Built on Thu Jan 15 21:32:52 PST 2015 [c4263c] by builder in /rel3.0-DC/oem/4-OEM-76/paXX/main
上面是远程控制台>