#19 0.671 ssh_exchange_identification: Connection closed by remote host RUN sshpass -p 'mypassword' ssh -T -p 2021 : => ERROR RUN sshpass -p 'mypassword' ssh -T -p 2021 0.7s Try allocating a TTY on connection (same error).I have run this on two consecutive day and the server's actual IP is dynamic (Should this affect anything if at all? ) #21 0.578 ssh_exchange_identification: Connection closed by remote hostĮxecutor failed running ]: exit code: 255Ĭhecking the domain details for the server #21 0.539 Pseudo-terminal will not be allocated because stdin is not a terminal. RUN sshpass -p 'mypassword' ssh -p 2021 : When I do this I get better output : => ERROR RUN sshpass -p 'mypassword' ssh -p 2021 0.6s Running a variation of the command without ssh-copy-id to see if I can get more verbose output #19 0.612 /usr/bin/ssh-copy-id: ERROR: ssh_exchange_identification: Connection closed by remote hostĮxecutor failed running -p 2021]: exit code: 1Ĭhecking if the host keys are copied (yes they exist) #19 0.611 of a basic regular expression is not portable it is ignored #19 0.611 expr: warning: '^ERROR: ': using '^' as the first character #19 0.543 /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed > RUN sshpass -p 'mypassword' ssh-copy-id -i /root/.ssh/test3.pub -p 2021: => CACHED RUN chmod 644 /root/.ssh/test3.pub 0.0s => CACHED RUN cd /root/.ssh/ & ssh-keygen -t rsa -C "TestKeys" -f test3 & ssh-keyscan -v -t rsa -p 2021 > /root 0.0s => CACHED RUN mkdir /root/.ssh/ & chmod 700 /root/.ssh & touch /root/.ssh/known_hosts 0.0s => CACHED RUN apk add -update -no-cache sshpass 0.0s Part of the build output : => CACHED RUN apk add -update -no-cache openssh 0.0s I get an error ssh_exchange_identification: Connection closed by remote host on the build. RUN sshpass -p 'mypassword' ssh-copy-id -i /root/.ssh/test3.pub -p 2021 Ssh-keygen -t rsa -C "TestKeys" -f test3 &\Ĭat /root/.ssh/known_hosts > /root/.ssh/scanned_keys.txt Ssh-keyscan -v -t rsa -p 2021 > /root/.ssh/known_hosts The logic for copying client public keys and server host keys is in the Dockerfile below: FROM alpine:3.2 I want to copy the client public keys for a container to a remote sftp server and after that attempt do some uploads to the server via bash script(the bash script will be invoked when the container runs).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |