Hi, we found the cause of the problem.
We used puppet to distribute everything and then SMSG to restart sshd to use 
the new config file.
But sshd was not restarted with the normal environment setup since it was via 
udev-rule triggered via a SMSG.
When we used expect together with Terminal Server to login into all servers and 
restart sshd by root, and then it worked fine.

Solution looks like this:

First of all you need to have expect installed on the terminal server. (If not: 
 yum install expect  [as root])
Then you need a script, an expect script as following:   (note: Execute the 
script as your own user!) 

#!/usr/bin/expect
#Usage script.expect <host> <ssh user> <ssh password> 

set timeout 60

spawn /usr/bin/iucvconn [lindex $argv 0] hvc2

expect "login:" { send "$argv 1\r" }
expect "Password:" { send "$argv 2\r" }
expect "$ " { send "sudo su\r" }
expect ": " { send "$argv 2\r" }
expect "# " { send "A COMMAND\r" }
expect "# " { send "exit\r" }
expect "$ " { send "logout\r" }
#interact 

The timeout is needed! Since if your terminal connection fails for some reason 
it needs to be stopped. The timeout does this for you. 
You can send more commands, but don't forget to send a "\r" after each one. 
You can uncomment the interact, but leave it like this if you want to execute 
the script on multiple servers. 
For example you can query zVM and put all servers in a txt file and execute it 
for all servers. 

#!/bin/sh
while read server
do
        echo "$server"
        ./script.expect "$server" "userx"  "mypassword"
done < servers.txt


BR /Tore


________________________________________________ 
Tore Agblad 
zOpen Teamleader
IT Services

Volvo Group Headquarters
Corporate Process & IT
Assar Gabrielssons väg 9
SE-405 08, Gothenburg  Sweden 
E-mail: [email protected] 
http://www.volvo.com/volvoit/global/en-gb/ 


-----Original Message-----
From: Agblad Tore 
Sent: den 16 januari 2015 12:41
To: 'Linux on 390 Port'
Subject: Ctrl-C does not work with update openssl + hwcrypto (RHEL 6.5)

Hi.
Anyone having problem with ctrl-c not working after adding support for 
hw-crypto ?
Turning off hw-crypto support makes it work again.
Ctrl-c also works if logged in via iucvtty (Terminal Server)

BR /Tore

________________________________________________ 
Tore Agblad 
zOpen Teamleader
IT Services

Volvo Group Headquarters
Corporate Process & IT
Assar Gabrielssons väg 9
SE-405 08, Gothenburg  Sweden 
E-mail: [email protected] 
http://www.volvo.com/volvoit/global/en-gb/ 

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to