Connecting to openwrt throw ssh - with password

Dear Forum Friends,

I would like to make a script and one of the important thing it's that it needs to connect by ssh to my openwrt.
My script worked perfect till I put a password to my user.
In my other linux device I wrote ssh User:Pass@192.168.1.2 and it worked but in Openwrt it didn't.

In the Openwrt what I got is that:
{

ssh User:Pass@192.168.1.2

User:Pass's password:
}

Please assist :confused:

Thanks in advance,
HeZilka.

This will be a limitation of busybox's ssh client...

If you do it like this your passwords are stored in your history... I won't do that anyway...

Why do you want to do this way?
Do you want to do that from a shell script?

You may have to use a key instead.

1 Like

Putting passwords into a script is considered very bad form.

I'd first find out if there is a way to do what you need without a user login!


If you search on "using ssh key authentication" you will find out how to configure a "key" that establishes your identity to the ssh server. You'll still need to properly protect that key as it is "your signature".

If you use ssh, you should also look into binding a specific command to that key. For example, the key could be used only to run wifi reload and nothing else.

1 Like

What do you mean by key? What should I do?

I need to make several action in the openwrt card and then return to my main card

Per @jeff's reply:

I tried this manual but didnt succeed...

Is there any possibility that I could make a new user without any password?
when I've opend a new user I had to provide a password and even if I pressed enter and leave it blank it also requested password when I tried to connect.

What are you trying to do?

The group here might be able to provide you a reasonably secure way to accomplish your goal if we knew what it was.

(password-less users are generally a bad idea)