2017년 3월 15일 수요일

ssh-copy-id Pseudo-terminal will not be allocated because stdin is not a terminal

ssh-copy-id Pseudo-terminal will not be allocated because stdin is not a terminal



# ssh-copy-id root@192.168.1.2
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh: Could not resolve hostname umask 077; test -d ~/.ssh || mkdir ~/.ssh ; cat >> ~/.ssh/authorized_keys && (test -x /sbin/restorec: Name or service not known

위와 같이 복사가 안 될 때는 scp 명령어로 복사하여 주면 됩니다.

# scp ./.ssh/id_rsa.pub root@192.168.1.2:~/.ssh/authorized_keys

authorized_keys 에 다른 서버의 키 값이 있다면 복사가 아닌 cat 으로 덧붙어 주어야 합니다.

# cat ./.ssh/id_rsa.pub | ssh root@192.168.1.2 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"


댓글 없음:

댓글 쓰기