torify does not look in /etc/hosts for known hosts

Bug #1688262 reported by themusicgod1
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tor (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

torify does not look in /etc/hosts for known hosts

I have a /etc/hosts file that is usually filled to the brim with servers that I can log into.

Alas torify does not seem to check this file when you try to connect to the server names of those hosts.

what should happen, and what does happen without torify:

themusicgod1@eva1:~$ ssh -l [user] aisha
[user]@aisha's password:

what happens with torify:

themusicgod1@eva1:~$ torify ssh -l [user] aisha
1493904752 ERROR torsocks[24334]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:683)
ssh: Could not resolve hostname aisha: Non-recoverable failure in name resolution

tor:
  Installed: 0.2.9.10-1ubuntu1
  Candidate: 0.2.9.10-1ubuntu1
ubuntu: 17.04 zesty

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: tor 0.2.9.10-1ubuntu1
ProcVersionSignature: Ubuntu 4.10.0-20.22-generic 4.10.8
Uname: Linux 4.10.0-20-generic x86_64
ApportVersion: 2.20.4-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity:Unity7
Date: Thu May 4 09:28:35 2017
InstallationDate: Installed on 2017-04-18 (15 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
JournalErrors:
 Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] failed with exit code 1: Hint: You are currently not seeing messages from other users and the system.
       Users in the 'systemd-journal' group can see all messages. Pass -q to
       turn off this notice.
 No journal files were opened due to insufficient permissions.
SourcePackage: tor
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
themusicgod1 (themusicgod1) wrote :
tags: added: artful
Revision history for this message
Stefan Strogin (steils) wrote :

Same issue, for torsocks as well. As a workaround I specify IP with 'HostName' in ~/.ssh/config.

tags: added: bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in tor (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.