I encountered a problem, I use sshpass and I need to write a script, but this command is not displayed in the script
If I enter this command into the terminal, then everything works for me and I get the output of all hidden folders on my server, but in the script itself it does not work
sshpass -p 'my_pswd' ssh srv@srv-server ls -a
This script displays an empty field, how would I get the output - ls -a
#!/bin/bash
value=$(sshpass -p 'my_pswd' ssh srv@srv-server ls -a)
echo $value
Thank you in advance :)