
시도해 보고 싶지만 lsh
OpenSSHD 서버와 통신하는 것이 매우 어려운 것 같습니다. 어떻게 해야 하나요?
답변1
OpenSSH 클라이언트에 대한 대안을 시도해 볼 준비가 되셨습니까?
그것은 당신에게 좋습니다. lsh
www.gnu.org/s/lsh/는 OpenSSH 서버와 함께 사용할 수 있는 GNU 대안입니다. 안타깝게도저것간단하지 않습니다.
ssh
OpenSSHD를 실행하는 로컬 호스트에 액세스 할 수 있다고 가정합니다 . 첫 번째 시도는 다음과 같습니다.
$ lsh localhost
No seed file. Please create one by running
lsh-make-seed -o "/home/tange/.lsh/yarrow-seed-file".
lsh: No randomness generator available.
그럼 이 파일을 만들어 보겠습니다.
$ mkdir .lsh
$ lsh-make-seed -o "/home/tange/.lsh/yarrow-seed-file"
lsh-make-seed: Reading system state...
lsh-make-seed: Got 150 bits of entropy from system state.
lsh-make-seed: Please type some random data. You better do this
lsh-make-seed: when connected directly to a console, typing over
lsh-make-seed: the network provides worse timing information, and
lsh-make-seed: more opportunities for eavesdropping.
----------------------------------------
........................................
lsh-make-seed: Got 182 keystrokes, estimating 200 bits of entropy.
lsh-make-seed: You can stop typing now.
lsh
이제 이 기능을 사용하지
/dev/urandom
않고 이 기능이 없는 시스템에서 다시 입력하는 것은 어리석은 일처럼 보입니다 .
$ lsh localhost
lsh: Failed to open `/home/tange/.lsh/host-acls' for reading (errno = 2): No such file or directory
lsh: Protocol error: Algorithm negotiation failed.
lsh
이는 최신 OpenSSHD와 함께 사용할 때 호환되지 않는 암호가 선택되었기 때문입니다 . 사용 -c aes256-ctr
- 왜 자동으로 수행되지 않는지 모르겠습니다.
$ lsh -c aes256-ctr localhost
lsh: Failed to open `/home/tange/.lsh/host-acls' for reading (errno = 2): No such file or directory
lsh: Server's hostkey is not trusted. Disconnecting.
lsh: Protocol error: Bad server host key
더 좋지만 충분하지는 않습니다. 편집증을 줄이면 lsh
다음과 같은 이점을 얻을 수 있습니다.
$ lsh -c aes256-ctr --sloppy-host-authentication localhost
lsh: Failed to open `/home/tange/.lsh/host-acls' for reading (errno = 2): No such file or directory
Received unauthenticated key for host localhost
Key details:
Bubble Babble: xitem-suten-vedyd-hibuv-naril-nisog-luvet-dagik-negem-kykeb-bexyx
Fingerprint: 4b:9f:4b:4d:10:6b:09:2b:be:ee:df:48:a0:75:d3:9a
Do you trust this key? (y/n) y
Last login: Mon Dec 7 08:11:58 2015 from 192.168.1.103
$
lsh
이 호스트 키를 신뢰할 수 있는 호스트 키에 추가 할 수 있습니다 .
$ lsh -c aes256-ctr --sloppy-host-authentication --capture-to ~/.lsh/host-acls localhost
Received unauthenticated key for host localhost
Key details:
Bubble Babble: xitem-suten-vedyd-hibuv-naril-nisog-luvet-dagik-negem-kykeb-bexyx
Fingerprint: 4b:9f:4b:4d:10:6b:09:2b:be:ee:df:48:a0:75:d3:9a
Do you trust this key? (y/n) y
Password for tange:
Last login: Fri Jan 8 12:46:57 2016 from localhost
$
lsh
그런 다음 일반 비밀번호를 사용하여 로그인 할 수 있습니다 .
$ lsh -c aes256-ctr localhost
Password for tange:
Last login: Fri Jan 8 12:48:36 2016 from localhost
$
클라이언트 키를 승인하려면 키를 OpenSSH 형식으로 변환하고 다음에 추가하세요 .ssh/authorized_keys
.
$ lsh-keygen | lsh-writekey
xxxxxx
xxxxxx
Enter new passphrase:
Again:
$ lsh-export-key --openssh < ~/.lsh/identity.pub | lsh -c aes256-ctr localhost 'cat >>.ssh/authorized_keys'
Passphrase for key `tange@hk':
Password for tange:
이제 lsh
키를 사용하여 OpenSSH 서버에 연결할 수 있습니다. 비밀번호 입력을 방지하려면 클라이언트 키를 암호화하지 마세요.
$ lsh-keygen | lsh-writekey -c none
xxxxxx
xxxxxx
$ lsh-export-key --openssh < ~/.lsh/identity.pub | lsh -c aes256-ctr localhost 'cat >>.ssh/authorized_keys'
Password for tange:
$ lsh -c aes256-ctr localhost
Last login: Fri Jan 8 12:48:40 2016 from localhost
$