ssh to server without password and without changing the server's setup
Hi,
this question is related to ssh into a server without password. I know, the usual way to accomplish this is to exchange public keys, which gets stored on the server. But I want to be able to log-in to the server without making changes to the server, i.e. to store the key in .ssh/authorized_keys or something. Is there any other way this can be accomplished? Thanks, Alex |
No.
Unless the server accepts passwordless accounts & ssh logins - which I really hope it doesn't! What you're asking is actually "is there a way I can set up my server so that anybody in the whole world can login". Why do you want to do this? |
Hi,
I do not want anybody in the whole world to login to the machine - I was just wondering if there is some other way I could authenticate myself. Instead of typing the password for each ssh connection, I hoped for a way of providing this authorization information, maybe in some kind of file which contains an encrypted version of the password. A kind of private key, which can be used to automate the authorization process. Is there no such way to handle ssh without installing/copying a public key to the server? Thanks Alex |
Aha, now I understand!
I don't know of any way to pass a password to the ssh prompt, maybe with some serious scripting? |
Somehow you need to authenticate yourself. So something has to be done on the server to grant access to someone. If you don’t want it on a per user basis: hostbased authentication may be an option. But this would also me to setup something on the server.
Maybe you can layout the intended use in more detail: why do you don’t want to install a public key on the server? |
Hi,
what I want to do is to TEST the server, and to execute scripts as part of the installed software. The best way to do this is to execute those scripts via ssh, because in that way you do not need to modify the system (For Testing, it is really important to test a setup as-is, without modifying it). I have several solutions: - For each ssh execution, I can type the password. Very inconvenient for hundreds of instructions. - I could add my public key on the server, but this violates the paradigm to leave the system in its to-test state, strictly spoken. What I would like to have instead of ssh <server> <command>with typing the password something like ssh -f <file_with_encrypted_password> <server> <command>to perform the same task, just without typing the password all the time and without the need to change the system. Hope this clarifies my special needs. Thanks Alex |
Quote:
Can you install anything on the server? Someone must have created the user account at least which you use for example. |
One additional note: you can also run 802.1x authentication on wire and the server you want to test would then need to contact an external RADIUS server for granting access - which is under your control again. I’m not sure whether it allows also an empty password – just an idea.
But again: something has to be done on the DUT. |
If this is just for testing, you could do it with an expect script. However this means your password is going to be shown in plain text in the script. Depending on the application, this might be acceptable though.
|
Quote:
|
The thread is 6 weeks old by now, but since I did find another solution:
I also found sshpass and a few examples with "expect": http://stackoverflow.com/questions/4...to-ssh-command |
All times are GMT -5. The time now is 08:16 PM. |