Sample Header Ad - 728x90

pass variable in ssh

10 votes
5 answers
36387 views
I'm trying to pass a variable to ssh remote but not works. My code is: #!/bin/bash set -x conexion="user@xx.yy.zz.pp" parameter="$1" ssh -T $conexion <<'ENDSSH' clear echo "$parameter" ENDSSH I execute: ./script.sh try It says me: parameter: Undefined variable. any help please?
Asked by user650034 (163 rep)
Jul 29, 2016, 08:40 AM
Last activity: Dec 14, 2023, 09:26 AM