1

I'm trying to set up a tor node following http://sickbits.net/creating-a-personal-privoxytorproxy-ec2-instance/ using ubuntu 14.4 lts on ec2. I've gotten to:

$ grep AllowTcp /etc/ssh/sshd_config
AllowTcpForwarding yes
$ sudo service ssh restart

when I run :

$ grep AllowTcp /etc/ssh/sshd_config

I get a blank line showing that this does not exist, I confirmed this by checking visually. Should I just add the line in or is this a mistake?

7
  • 1
    You can add the line manually and then check the availability again after restarting ssh.
    – heemayl
    Feb 23, 2015 at 19:21
  • I've added the line, restarted and confirmed it with the grep. what do you mean by "check the availability" ? - Thanks, Bill Feb 23, 2015 at 19:39
  • Does the output of grep showing the line now?
    – heemayl
    Feb 23, 2015 at 19:42
  • yes, I can see it now. Feb 23, 2015 at 19:50
  • Then you are good :)
    – heemayl
    Feb 23, 2015 at 19:51

1 Answer 1

2

You can add the line manually to the /etc/ssh/sshd_config file.

If the line were there before restarting, then it should be there after restarting too unless something has been done in the meantime or the restarting (stop-start) the service itself removes the line. In your case the the line should be there after restarting ssh.

If any invalid line is added to the /etc/ssh/sshd_config file, then ssh won't start after being stopped i.e. when you do sudo service ssh restart, ssh service will stop at first and then while starting it will read the configuration file and find an invalid line, then it would simply just stay stopped. You then need to delete the invalid line to start ssh service again.

2
  • I think what you are saying is that after I added the line and restarted, if the line was invalid it would have been deleted from the file? Feb 23, 2015 at 20:08
  • @user61629: Please check my edits in the answer..
    – heemayl
    Feb 23, 2015 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .