# SSH, specify password with command.

## dragos240

Say I want to create a script that tells me the contents of a log on my server. I still need to enter the ssh password to view my log.

How could I either specify the password in the command, or set this up in a config file?

Is this possible to do? If so, how. For security reasons, I cannot disable the password on the server side.

----------

## albright

 *Quote:*   

> For security reasons, I cannot disable the password on the server side.

 

I take it that you mean public key authentication is not an option?

----------

## floppymaster

If you really can't do public key auth, net-misc/curl supports using a password non-interactively. Just make sure to enable to libssh2 USE flag.

----------

## wjb

Run ssh-add when you login, tell it your passphrase, then for the rest of the session you can use ssh without having to enter the passphrase again.

----------

## Naib

any reason why you can't use ssh keys?

----------

## dragos240

 *wjb wrote:*   

> Run ssh-add when you login, tell it your passphrase, then for the rest of the session you can use ssh without having to enter the passphrase again.

 

Thanks.

----------

