Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a device that supports strange "ssh". It doesn't support key auth an my problem is I don't know how to feed it username and password (-l or user@host are not working). It asks for login and password after connection like this:

zeratul@antioch:~$ ssh 1.2.3.4

Please login: user
password : 
Login incorrect

Is it even possible to do that from shell script or can I forget it?

Thanks in advance.

share|improve this question
    
Doesn't support key auth? That's obnoxious... –  Ignacio Vazquez-Abrams Feb 28 '12 at 3:31
    
Yeah, well seems to be common for Ruckus Wireless devices. I've one of them in very noisy area an sometimes it deadlocks during reconfiguration and I need to reboot it/switch channels manually. I'm trying to automate that. –  Zeratul Feb 28 '12 at 11:09

1 Answer 1

up vote 5 down vote accepted

What you need is expect (it's a package you can install with yum). That's what it's made for.

I've found a Stack Overflow question that should help you or at least guide you in the right direction.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.