|
|||||||||
SSH2 の変更点
* ssh key [#gf433ddd]
ssh-keygen -t rsa -b 4096
cd .ssh
mv -f id_rsa.pub authorized_keys
chmod 600 authorized_keys
id_rsa は private key なので local に保存した後に消す
* ssh key ecdsa [#f9d6194f]
ssh-keygen -t ecdsa -b 521
ただしこれで作った鍵は古いssh や mac では使えないかも~
* portforward [#t56d51cb]
*** teraterm [#a01ca444]
setup -> SSH Forwarding -> add
|Forward local port|8080 | |
|to remote machine |localhost | 8080 |
save config
あるいは、TERATERM-INI に
DefaultForwarding=L8080:localhost:8080
*** コマンドライン [#oa7ab10c]
ssh -N -L 1999:127.0.0.1:8080 【user】@【リモートホスト】 -i .ssh/id_rsa
* sshd 設定 [#v2657d75]
キーなしのログインを禁止する
# emacs /etc/ssh/sshd_config
PasswordAuthentication no
Port 【設定したいport】
Protocol 2
PermitRootLogin no
|
|||||||||