
MachineB, shitty but useful Pentium4 @ 3.4Ghz with 2GB of ram
I happen to have a PA-RISC machine, and gNAT doesn't exist for it.
Therefore I am using the following trick:
- MachineA: ip 192.168.1.20, linux on PA-RISC workstation, my HPPA C3600
- MachineB: ip 192.168.1.24, linux on i686 < -- gGNAT exists for i686!
(*) MachineA and MachineB are sharing a NFS link.
Code: Select all
host_remote="192.168.1.24" # MachineB's IP
echo "step1"
ssh-keygen -t rsa
echo "step2"
if [ ! -f ~/.ssh/id_rsa.pub ]
then
echo "failure"
exit
fi
ssh $host_remote mkdir -p .ssh
echo "step3"
cat ~/.ssh/id_rsa.pub | ssh $host_remote 'cat >> ~/.ssh/authorized_keys'
(to be executed from the MachineA's console)
Code: Select all
host_remote="192.168.1.24"
argc="$#" # how many arg from bash command line ?
app_args="" # where to store arguments from bash command line
args=("$@") # args[]={arg0..argC}
here="`pwd`"
argv="cd $here; source /etc/profile; "
for ((i=0;i< =argc;i+=1))
do
argi="$i"
argv="$argv ${args[$i]} "
done
ssh $host_remote $argv
ans="$?"
if [ "$ans" == "0" ]
then
answ="success"
else
answ="failure"
fi
echo "$answ"
on MachineA, /usr/bin/myrexec (bash script)
Results, on MachineA
Code: Select all
remote_ctrl # myrexec gnat -v
v4.3.5
success
Code: Select all
remote_ctrl # myrexec cat /proc/cpuinfo | grep name
model name : Intel(R) Pentium(R) 4 CPU 3.40GHz
success
Ugly, simple, but it works

Note:
this line
Code: Select all
for ((i=0;i< =argc;i+=1))
needs a fix up
I can't write the correct form because it wastes the whole post
it seems a bug in the forum, related to [ code ] "< =" [ /code ]