Secure OS Software for Linux
cancel
Showing results for 
Search instead for 
Did you mean: 

ssh/scp Problem from one server and not the other

 
Marty Metras
Super Advisor

ssh/scp Problem from one server and not the other

I am running a script that works on all but one host.
Basiclly I "ssh $SERVER /Run/A/Script"
Then on $SERVER I "scp /results/of/script $HOST:/director"
Then back on the $HOST I do more things with the data.
Any way I get this error "You have no controlling tty. Cannot read passphrase."
This error only happen from one of of the HP-UX 11.0 servers. I do not see any difference in settings /dev/tty rights.
I have no passphrase on any of the 4 servers involved. I have replaces the ssh key. Some thing is different on the one UNIX server.
So you do not get to confused here is what I am doing that dose not work.
From a UNIX(HP) server I am execute a command using ssh on a Linux server to see if MYSqlis up(mess of other stuff too) it creates a file that is send back to the UNIX server that I can use to verify all is well and then process all the other stuff that works fine.
This all works fine from one UNIX server to any one of the Linux server. And fails form the other UNIX server.

Any ideas?
Marty
The only thing that always remain the same are the changes.
4 REPLIES
Michael Selvesteen_2
Trusted Contributor

Re: ssh/scp Problem from one server and not the other

Try the following,

ssh $SERVER -t /Run/A/Script.

"-t" enforces a tty for the ssh connection.

All the best

Senthilmurugan
Frequent Advisor

Re: ssh/scp Problem from one server and not the other

Hello Marty Metras,

Please check the permissions of /dev/tty. It should be "crw-rw-rw-" i.e. 0666. It nopt please reset the permissions on /dev/tty to mode 0666

#chmod 0666 /dev/tty


I thinks this may solve the problem.

Regards,
Senthil Murugan
Marty Metras
Super Advisor

Re: ssh/scp Problem from one server and not the other

Senthil
I just checked and /dev/tty is set to 0666 (crw-rw-rw-)
The only thing that always remain the same are the changes.
Marty Metras
Super Advisor

Re: ssh/scp Problem from one server and not the other

All else failing to give me what I want to do I rewrote my script.
If I ssh to server B from A executing a script that creates some data. Then use scp from server A to scp the data from B back to A, it works fine between all 4 servers.
I was using ssh from server A to Execure a script on server B that would create the data and scp the data back to server A to save user interaction. It would fail with one pair of servers.
I know about using SSH and public key to encript with out password. I am using that elsewhere. In this case it will not work because of a couple reasons.
Many users must use this script and the one Server that has to be uses is Redhat 6.2 and it dose not play well with new versions of ssh. This server is out of our control to upgrade.
Rewriting the script putting the scp on other server is working fine so until I can get them to upgrade the Redhat 6.2 it will have to do.
Thanks for your help.
Marty
The only thing that always remain the same are the changes.