specify/remember ssh password? custom ssh port?

Asked by sean on 2009-03-27

Can I specify my password in the command line, or otherwise have it cached/remembered somehow?

Also, does this support custom SSH ports? Mine is not configured to 22.

Thanks,
Sean

Question information

Language:
English Edit question
Status:
Solved
For:
bzr Upload plugin Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Ladeuil
Solved:
2009-03-27
Last query:
2009-03-27
Last reply:
2009-03-27
Best Vincent Ladeuil (vila) said : #1

Custom ssh ports can be speficied as:

  sftp://host:<cutom port>/path

You can specify password on the command line as:

   sftp://<login>:<password>@host/path

but it is not recommended for security reasons.

Using passwords with ssh is also less secure than using keys and register them on the server (in the .ssh/authotized_keys file on the server).

sean (somlor) said : #2

awesome! thanks.

Vincent Ladeuil (vila) said : #3

> Using passwords with ssh is also less secure than using keys and register them on the server (in the .ssh/authotized_keys file on the server).

I meant: Using passwords is less user friendly than using keys (and an ssh agent that will cache the key password and avoid querying the user each time it's needed). The keys can be regsitered server-side in the .ssh/authorized_keys file.