Changeset dceeef9 for fedd


Ignore:
Timestamp:
Dec 3, 2008 10:11:40 PM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
1b376ca
Parents:
266e866
Message:

Restrict ssh (and allow 0 counts in Allbeds)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r266e866 rdceeef9  
    442442        """
    443443
    444         scp_cmd = [self.scp_exec, '-i', self.ssh_privkey_file, file,
    445                 "%s@%s:%s" % (user, host, dest)]
     444        scp_cmd = [self.scp_exec, '-o', 'IdentitiesOnly yes', '-i',
     445                self.ssh_privkey_file, file, "%s@%s:%s" % (user, host, dest)]
    446446        rv = 0
    447447
     
    464464        only logged.
    465465        """
    466         sh_str = "%s -i %s %s@%s %s" % (self.ssh_exec, self.ssh_privkey_file,
    467                 user, host, cmd)
     466        sh_str = "%s -o 'IdentitiesOnly yes' -i %s %s@%s %s" % \
     467                (self.ssh_exec, self.ssh_privkey_file,
     468                        user, host, cmd)
    468469
    469470        try:
     
    528529        no_exp_re = re.compile("^No\s+such\s+experiment")
    529530        state = None    # Experiment state parsed from expinfo
    530         # The expinfo ssh command
    531         cmd = [self.ssh_exec, "%s@%s" % (user, host), expinfo_exec, pid, eid]
     531        # The expinfo ssh command.  Note the identity restriction to use only
     532        # the identity provided in the pubkey given.
     533        cmd = [self.ssh_exec, '-o', 'IdentitiesOnly yes', '-i',
     534                self.ssh_privkey_file, "%s@%s" % (user, host),
     535                expinfo_exec, pid, eid]
    532536
    533537        # Get status
     
    940944                    if image: rn['image'] = [ image ]
    941945                    if hw: rn['hardware'] = [ hw ]
    942                     if count: rn['count'] = int(count)
     946                    if count and int(count) >0 : rn['count'] = int(count)
    943947                    rnodes.append(rn)
    944948                req['resources']= { }
Note: See TracChangeset for help on using the changeset viewer.