client:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/myuser/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/myuser/.ssh/id_rsa.
Your public key has been saved in /home/myuser/.ssh/id_rsa.pub.
The key fingerprint is:
11:1d:9e:b0:68:1d:2d:3a:0a:41:be:51:db:67:1f:05 myuser@client
Generating public/private rsa key pair.
Enter file in which to save the key (/home/myuser/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/myuser/.ssh/id_rsa.
Your public key has been saved in /home/myuser/.ssh/id_rsa.pub.
The key fingerprint is:
11:1d:9e:b0:68:1d:2d:3a:0a:41:be:51:db:67:1f:05 myuser@client
Cria o arquivo se não existir e add a ultima linha a sua chave
$ ssh usuario@host -X
$ gedit .ssh/authorized_keys
cola o conteudo do arquivo .pub salva e fecha
$ chmod 0644 $HOME/.ssh/authorized_keys
alternativa
client:~> ssh-copy-id usuario@host
$ gedit .ssh/authorized_keys
cola o conteudo do arquivo .pub salva e fecha
$ chmod 0644 $HOME/.ssh/authorized_keys
alternativa
client:~> ssh-copy-id usuario@host
criar tunel
ssh -qTfnNC -D 5900 usuario@host
Explicação:5900 é a porta
-q :- be very quite, we are acting only as a tunnel.
-T :- Do not allocate a pseudo tty, we are only acting a tunnel.
-f :- move the ssh process to background, as we don’t want to interact with this ssh session directly.
-N :- Do not execute remote command.
-n :- redirect standard input to /dev/null.
-C :- enabling compression.
aew bota o programa pra rodar em socks v5 com localhost e 5900
(about:config and set network.proxy.socks_remote_dns to true)
... isso funciona O.o
agradecimentos aos comentários dessa página aqui
Durma com esse barulho!
Nenhum comentário:
Postar um comentário