Problem running ssh from remote server

So I have a script which performs some basic commands on another server via ssh. It works great, no issues at all. Let's call this "Script A"

BUT, this working script is to be executed remotely from a different UNIX script on another server, also by ssh. Let's call this "Script B".

When Script B calls Script A, the ssh in Script A no longer connects. There's no error output so I don't know exactly what is happening.

My first thought is that this is keyfile-related. The box with Script A has a keyfile to automatically login to the destination machine. Does the box with Script B also need a keyfile to this destination machine?

So if Script A has this:

ssh -l $sshid $sship "echo test"

And I call Script A from Script B, nothing is displayed. The values of the connection variables have been tested and confirmed, and whoami shows the correct user. So I can't see how Script A should act any differently when called locally by me, and remotely by another box.

Any help appreciated.

I haven't got multiple machines to test on but I have come across this before and think you might have to invoke one or both of the SSHes with the -t option to force the creation of the tty device?