0

I'm trying to see if its possible to insert my password to below command.

sftp -o “Port 44444” myusername@mysite.com 

Im looking to have a one line command to login into our sftp.

Thanks

rookievmc
  • 173
  • 2
  • 2
  • 13

1 Answers1

1

No. It is not secure and therefore not possible with native OpenSSH tools. But you can use sshpass:

sshpass -p password sftp -o “Port 44444” myusername@mysite.com 

or rather set up pubkey authentication:

ssh-keygen -t rsa -f ~/.ssh/id_rsa
ssh-copy-id -o “Port 44444” myusername@mysite.com 
Jakuje
  • 24,773
  • 12
  • 69
  • 75