Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Can't login to SUT without password while using ssh backend #43

Open
bhargavdas opened this issue Jul 23, 2021 · 0 comments
Open

Can't login to SUT without password while using ssh backend #43

bhargavdas opened this issue Jul 23, 2021 · 0 comments

Comments

@bhargavdas
Copy link

bhargavdas commented Jul 23, 2021

While trying to execute test in SUT using ssh backend, if the SUT doesn't have a password runltp-ng is not able to login.

Here is my observation till now,

  • Used a raspberry pi yocto build (ltp installed), no password required for login
bhargav@ubuntu:~/LTP-ng/runltp-ng (master)$ ./runltp-ng --verbose --cmd=/opt/ltp/testcases/bin/write01 --backend=ssh:host=192.168.0.111
Using ssh backend; parameters 'host=192.168.0.111'
ssh:password or ssh:key_file must be set! at backend.pm line 608.
  • After this I created a password for login
bhargav@ubuntu:~/LTP-ng/runltp-ng (master)$ ./runltp-ng --verbose --cmd=/opt/ltp/testcases/bin/write01 --backend=ssh:host=192.168.0.111:password=123
Using ssh backend; parameters 'host=192.168.0.111 password=123'
Waiting for sshd to accept connections
Starting ssh: export TERM=dumb; script -f -c 'ssh   root@192.168.0.111' /dev/null
Waiting for prompt
Waiting for regexp '(?^:[Pp]assword:)'
ssh: Script started, file is /dev/null
Writing string '123'
Writing string '/opt/ltp/testcases/bin/write01; echo cmd-exit-0-$?'
Waiting for regexp '(?^:cmd-exit-0-\d+)'
ssh: root@192.168.0.111's password: 
ssh: Last login: Fri Mar  9 12:54:47 2018 from 192.168.0.112
ssh: root@raspberrypi3-64:~# /opt/ltp/testcases/bin/write01; echo cmd-exit-0-$?
ssh: tst_test.c:1311: TINFO: Timeout per run is 0h 05m 00s
ssh: write01.c:40: TPASS: write() passed
ssh: 
ssh: Summary:
ssh: passed   1
ssh: failed   0
ssh: broken   0
ssh: skipped  0
ssh: warnings 0
ssh: cmd-exit-0-0
Cmd exit value 0
0
root@192.168.0.111's password: 
Last login: Fri Mar  9 12:54:47 2018 from 192.168.0.112
root@raspberrypi3-64:~# /opt/ltp/testcases/bin/write01; echo cmd-exit-0-$?
tst_test.c:1311: TINFO: Timeout per run is 0h 05m 00s
write01.c:40: TPASS: write() passed

Summary:
passed   1
failed   0
broken   0
skipped  0
warnings 0
Writing string '! [ -e /opt/ltp ]; echo cmd-exit-1-$?'
Waiting for regexp '(?^:cmd-exit-1-\d+)'
ssh: root@raspberrypi3-64:~# ! [ -e /opt/ltp ]; echo cmd-exit-1-$?
ssh: cmd-exit-1-1
Cmd exit value 1
Writing string 'exit'

Am I missing something here or is this a bug?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant