How to request a new TOR ID in the terminal

I try to connect to TOR via telnet in my terminal on my mac osx and request a new identifier, but it does not work, I always get this error message:

Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host 

I use this telnet command to connect:

 telnet 127.0.0.1 9051 

And the idea why this is not working?

THX

+17
terminal tor telnet macos
Jun 07 '13 at 15:16
source share
2 answers

The fastest and easiest way to get a β€œnew ID” is to send a HUP .

Tor daemon re-reads the configuration files and makes a "new identifier".

I keep a special bash script for this:

 # cat /usr/local/bin/nym #!/bin/bash pidof tor | xargs sudo kill -HUP 

My sudoers file, full NOPASSWD:

 # cat /etc/sudoers .... anonymous ALL=(ALL) NOPASSWD: ALL ... 

Try it.

+18
Aug 28 '13 at 1:48 on
source share

Have you installed a management port in your torrc? To make it accessible via telnet, you will need a β€œControlPort 9051”. After that, you will want to give the NEWNYM signal ...

 $ telnet localhost 9051 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. AUTHENTICATE 250 OK SIGNAL NEWNYM 250 OK 

You can do this with a script using stem with ...

 from stem import Signal from stem.control import Controller with Controller.from_port(port = 9051) as controller: controller.authenticate() controller.signal(Signal.NEWNYM) 

Thanks for the question! I added it to stem faq .

+12
Jun 16 '13 at 0:09
source share



All Articles