Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

I suggest to use a ssk-key so you do not have to provide any password. There are plenty of tutorials out there on how to use them, for example this one.

In case you want to use inline password you can try installing sshpass and executing:

sshpass -p 'YourPassword' ssh user@host

Source: SSH login with clear text password as a parameter?SSH login with clear text password as a parameter?

By the way, if you want to execute a command in the remote machine, you just have to write the remote command between quotation marks:

sshpass -p 'YourPassword' ssh user@host "ls -l"

I suggest to use a ssk-key so you do not have to provide any password. There are plenty of tutorials out there on how to use them, for example this one.

In case you want to use inline password you can try installing sshpass and executing:

sshpass -p 'YourPassword' ssh user@host

Source: SSH login with clear text password as a parameter?

By the way, if you want to execute a command in the remote machine, you just have to write the remote command between quotation marks:

sshpass -p 'YourPassword' ssh user@host "ls -l"

I suggest to use a ssk-key so you do not have to provide any password. There are plenty of tutorials out there on how to use them, for example this one.

In case you want to use inline password you can try installing sshpass and executing:

sshpass -p 'YourPassword' ssh user@host

Source: SSH login with clear text password as a parameter?

By the way, if you want to execute a command in the remote machine, you just have to write the remote command between quotation marks:

sshpass -p 'YourPassword' ssh user@host "ls -l"
Source Link
Iñaki Murillo
  • 765
  • 1
  • 4
  • 14

I suggest to use a ssk-key so you do not have to provide any password. There are plenty of tutorials out there on how to use them, for example this one.

In case you want to use inline password you can try installing sshpass and executing:

sshpass -p 'YourPassword' ssh user@host

Source: SSH login with clear text password as a parameter?

By the way, if you want to execute a command in the remote machine, you just have to write the remote command between quotation marks:

sshpass -p 'YourPassword' ssh user@host "ls -l"