Menu

#11 change xongp to use ssh not rsh

open
nobody
None
5
2016-07-09
2016-07-09
seismick
No

In cfe, the "ICPS (remote)" button does not work. Main reason is that
it uses rsh. So try ssh instead. With a few hacks, I got jobs
running on another machine.

1) In xon, the test for ssh has wrong path to ssh and is broken.
It needs to be rewritten as

if [[ -f /usr/bin/ssh ]] && [[ klzzwxh:0003 != klzzwxh:0004 ]]; then
rsh="/usr/bin/ssh -f"

There is another test for ssh to change also:

if [ "$rsh" != "/usr/bin/ssh -f" ]; then
vars="$xpath$xauth"DISPLAY="$DISPLAY"

2) Create a copy of rsh_timeout.c called ssh_timeout.c
Find and replace "rsh" with "ssh" troughout. In etc/Makefile,
add rule for ssh_timeout.c (just like rsh_timeout's).
One could simply modify rsh_command in rsh_timeout.c to be ssh,
that is the minimal change needed, but rsh_timeout is used in
code other than xongp.

3) In xongp, change rsh_timeout to ssh_timeout and any messages which
mention rsh:
if [ "$(ssh_timeout $XON_HOST 2 uptime 2>/dev/null)" ] ; then
echo "$XON_HOST responds to ssh"
else
echo "machine $XON_HOST no ssh, trying another"
PID=$((PID+1))
pick_node
fi

4) Optionally, modify subroutine cfewb_icps_trap in cfewb.f90 to change
object%prog_icps to simpler "icps_script" like this:

  cmd = '\xterm -sb -sl 5000 -g 100x50 -e '//trim(xongp_bin)//' '//local_flag//' "'// &
         'icps_script '  &
         //trim(object%working_dir)//trim(object%currentJobName)//   &
         ' | tee '//trim(logfile)//' "&'

This allows you to run job on machine with different platform, e.g. remote
is 64-bit but you are on 32-bit. As there appear to be no "icpsbeta" nor
"icpsalpha", the hardwired command should cause no problem.

Rationale for all the above is that rsh is disabled in recent linux versions.
One must install rsh-server, modify the hosts.allow, hosts.equiv, rsh
and securetty files and turn off firewall. Then if you upgrade linux,
it is disabled again. This is more hassles than setting up ssh to
connect yourself without a password.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.