SSH Confusion -- Question

7150 linux.1 at
Fri Oct 26 01:42:07 CEST 2007

I am here in the networking
( wiki:

SSH Extras

If you get fed up with typing root at, on your PC edit
/etc/hosts and add an entry for 'phone' phone

then edit ~/.ssh/config (or create it) and add

host phone
user root

then all you need to do is type

# ssh phone

To avoid ssh added a new line for every ssh host-key to you known_hosts
you can add the following to the phone section in ~/.ssh/config

 UserKnownHostsFile /dev/null

My question is, what does the tilde mean in the filename: ~/.ssh/config

I think I have to create this file, but am a bit apprehensive about
creating .ssh/config in the root directory. That directory/file does not
presently exist there.




Following is my current log of networking activities:


10-24-2007: Attempt to establish basic network connection to Neo.
Running Ubuntu 7.10 (gutsy)

>From the wiki:

Edit /etc/network/interfaces file ():

auto usb0
iface usb0 inet static
        up iptables -A POSTROUTING -t nat -j MASQUERADE -s &
        up echo 1 > /proc/sys/net/ipv4/ip_forward &
        up iptables -P FORWARD ACCEPT &
        down iptables -D POSTROUTING -t nat -j MASQUERADE -s &

Completed as root.

Patch /etc/udev/rules.d/85-ifupdown.rules:

Ubuntu feisty appears to have a bug where ifdown is not run when the
interface is unplugged, meaning this only works once after the system is
booted. One can patch /etc/udev/rules.d/85-ifupdown.rules, editing the
two lines at the end of the file:

SUBSYSTEM=="net", DRIVERS=="?*", GOTO="net_start"


# Bring devices up and down only if they're marked auto.
# Use start-stop-daemon so we don't wait on dhcp
ACTION=="add",          RUN+="/sbin/start-stop-daemon --start
--background --pidfile /var/run/network/bogus --startas /sbin/ifup --
--allow auto $env{INTERFACE}"


ACTION=="remove",       RUN+="/sbin/start-stop-daemon --start
--background --pidfile /var/run/network/bogus --startas /sbin/ifdown --
--allow auto $env{INTERFACE}"

the bug is that the LABEL="net_end" is after the ACTION line in the

I checked my gutsy file. It was wrong, so I changed it as root to the
feisty specification above.

I restarted the computer.

Ping test:

y7150 at Fluffy:~$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.059 ms
64 bytes from icmp_seq=2 ttl=64 time=0.054 ms
64 bytes from icmp_seq=3 ttl=64 time=0.053 ms

--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.053/0.055/0.059/0.006 ms
y7150 at Fluffy:~$


10-24-07: Attempt to establish ssh connection to Neo

As root

Performed: ifconfig usb0 netmask

then: ping -I usb0


then: /sbin/route add -host dev usb0

then: ssh root at

The authenticity of host ' (' can't be
RSA key fingerprint is [hex dotted string].
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added '' (RSA) to the list of known hosts.
root at's password:
root at fic-gta01:~$

Success -- ssh logon also works with sudo

More information about the device-owners mailing list