Ssh remote login for advice

1
this is how I logged in

ssh $SERVERUSERNAME@$SERVERIPV4-p $SERVERPORT < < serveraction
~ Code ~

serveraction

the result window always prompts
Pseudo-terminal will not be allocated because stdin is not a terminal.

what does this mean?
do I have to have this?

/ dev/null 2 > & 1?

adding-t to update: has no effect.

2 requires administrator privileges during code execution,
but the waiting time for me to enter my password is so short that it almost skips it.
then come out of this picture, what is the reason?

Password: su: Authentication failure

come out first. Password:, cursor flashes there for seven or eight seconds and su: Authentication failure comes out immediately

my code is either su-root-s / home/$SERVERUSERNAME/Documents/scripts/centos7/centos7_server1.sh, or

< H1 > su-root < < EOF < / H1 > < H1 > bash / home/$SERVERUSERNAME/Documents/scripts/centos7/centos7_server1.sh < / H1 > < H1 > bash / home/$SERVERUSERNAME/Documents/scripts/centos7/centos7_server2.sh < / H1 > < H1 > EOF < / H1 >

the server forbids root login, but manual remote login can switch to root

.

Thank you all

.
Jul.11,2021

Pseudo-terminal will not be allocated because stdin is not a terminal.

because you switch to input via < <, stdin can no longer be used as a terminal. There are two options
ssh-T $SERVERUSERNAME@$SERVERIPV4-p $SERVERPORT < < serveraction to unassign pseudo terminals

or add two t

ssh-tt $SERVERUSERNAME@$SERVERIPV4-p $SERVERPORT < < serveraction force assignment

  • How shell ssh executes multiple local scripts to download in a bash environment

    We know: ssh root@host -C " bin bash" < 1.sh you can execute local scripts. but now there are two scripts, 1.sh and 2.sh, where 1.sh is the configuration file and 2.sh needs to use the configuration file variables. excuse me, how do ss...

    Mar.24,2021
  • Ssh login OK, but scp failed

    I can log in to ssh because I still asked for my publickey password and successfully logged in . but not when scp transfers files commands executed by the local root scp-r-p $SERVERPORT $ROOTDIR $SERVERUSERNAM@$SERVERIPV4: home $SERVERUSERNAME Docum...

    Jul.09,2021
Menu