S
Size: a a a
VM
R
LK
whoami
cd $CODEBUILD_SRC_DIR;
ls -lah
mkdir -p /root/.ssh
ls -lah /root/.ssh
echo $(cat pv-key) > /root/.ssh/id_rsa
cat /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa
ssh-keyscan github.com >> /root/.ssh/known_hosts
ssh-add /root/.ssh/id_rsa
ps axu | grep ssh
eval "$(ssh-agent -s)"
git clone -vvv git@github.com:repository......git
# github.com:22 SSH-2.0-babeld-c0ad48aa
# github.com:22 SSH-2.0-babeld-c0ad48aa
# github.com:22 SSH-2.0-babeld-c0ad48aa
Could not open a connection to your authentication agent.
root 221 0.0 0.0 8996 932 ? S 07:41 0:00 grep ssh
Agent pid 223
Cloning into '<repository>'...
Warning: Permanently added the RSA host key for IP address '192.30.255.113' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
LK
debug1: Trying private key: /root/.ssh/id_rsa
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug2: no passphrase given, try next key
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /root/.ssh/id_ecdsa
debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /root/.ssh/id_ed25519
debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
/root/.ssh/id_rsa
естьBY
VS
BY
LK
ssh-keygen -t rsa -b 4096 -q -N "" -C "codebuild@amazonaws.com"
S
S