remote_open with SSH

View: New views
1 Messages — Rating Filter:   Alert me  

remote_open with SSH

by takhanda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I am running the latest dejagnu that is available on Ubuntu 8.10 . I  
have some tests that were written using remote_open, remote_expect and  
remote_send originally intended to used with the target running a  
telnet server. Now, I am trying to run the same suite of tests using  
SSH public key authentication. I have made the necessary changes in  
the board configuration file to use SSH, but I have come across a  
problem: remote_open still asks me for a password.

I am fairly certain that I've configured the SSH public key  
authentication correctly in terms of generating keys, migrating the  
public key file, and then setting the permissions on authorized_keys,  
id_rsa, and .ssh . I can connect to the target with just "ssh -l user  
my-target". Furthermore, I can use any of remote_load, remote_exec,  
and remote_spawn without being asked to put in a password. Looking at  
the "runtest ... -v -v -v" output, it is clear that a password is  
being asked for, and since there is no match in rsh_open (rsh.exp),  
the test times out successively.

The relevant log output with "-v -v -v" looks like:
spawn /usr/bin/ssh -l user my-target

  user@my-target's password:  warning "/usr/bin/ssh: timed out trying  
to connect."
warning "/usr/bin/ssh: timed out trying to connect."
warning "/usr/bin/ssh: timed out trying to connect."


Below, you will find the board configuration, and test script. I am  
calling runtest like so runtest --target_board=my-target_ssh foo.exp

# my-target_ssh.exp
load_generic_config "unix"
process_multilib_options ""
set_board_info compiler  "[find_gcc]"
set_board_info bmk,use_alarm 1

set_board_info rsh_prog /usr/bin/ssh
set_board_info rcp_prog /usr/bin/scp
set_board_info connect rsh

set_board_info username test
set_board_info name my-target
set_board_info hostname my-target
set_board_info netport my-target

# foo.exp
print "remote_open"
set result [remote_open my-target  ]
print $result


Thanks in advance,

Tareq A Khandaker




_______________________________________________
DejaGnu mailing list
DejaGnu@...
http://lists.gnu.org/mailman/listinfo/dejagnu