1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
iPod Convenience Sync
by: Mario Limonciello, November 2007
http://www.launchpad.net/ipod-convenience
This package allows you to mount, sync, and unmount a 7th Generation iPod.
These devices include the iPhone, 8gb iPod Touch, & 16gb iPod Touch currently.
Prerequisites
---------------------
<Jailbreaking>
In order to use this package, your device must be jailbroken.
Note, you may need a Windows or Mac machine to do this.
Information on how to jailbreak an iPod is available at
http://www.touchdev.net/wiki/How_to_Escape_Jail
After your device is jailbroken, be sure that you have
the OpenSSH service installed and running.
<Keyless SSH>
When you mount your device manually (by running sshfs), you're required to supply your password to login. This makes it impossible for applications such as Amarok to perform the mount on
demand - as in, connect - since it doesn't take the password prompt into consideration. You need a passwordless login for that!
First, you want to generate a private and a public passkey, if you don't have one already. Enter this command on your local machine (not in an ssh session to your device), accept the
default location, and don't enter any passphrase.
ssh-keygen -t rsa
This will create a directory called .ssh in your home directory, and place three files in there: id_rsa, id_rsa.pub, and known_hosts. id_rsa is your private keyfile, and id_rsa.pub is
your public one. You want your device to have the public key so you can authenticate towards it with your private one. After entering this next command, if it asks if you want to
accept the untrusted device as a trusted host, do so.
ssh-copy-id -i ~/.ssh/id_rsa.pub root@<device ip>
This will copy your public keyfile and place it into /var/root/.ssh/authenticated_keys on your device, creating it if necessary. Now log back in.
ssh root@<device ip>
Don't worry if it asks for your password; at this point, it still should. Feel free to view the contents in the authenticated_keys file and compare to your own id_rsa.pub file, if you
wish. Don't log out yet.
chmod 0755 ~ ~/.ssh
chmod 0644 ~/.ssh/*
Do this while still logged in. This will set up the permissions the ssh daemon requires to read root's authenticated keys. Next we'll configure some settings.
nano /etc/sshd_config
If you aren't familiar with nano, now's a good opportunity to get to know it better.
Scroll down to the segment beginning with '#RSAAuthentication', and set it up as follows:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile %h/.ssh/authorized_keys
Be sure to remove any hashmarks (#) at the beginning of those three lines, or else they won't be read. Hit Ctrl+O to save, and Ctrl+X to exit.
At this point you should be finished. Reboot your device.
reboot
If you're confident you've given it time enough to start up, try logging back in. Hopefully, without supplying any password.
ssh root@<device ip>
<DNS>
If your network has a tendancy to hand out addresses that are always changing, you should set up DNS or a static address.
This syncing method is highly dependent upon you knowing the ip address of your device.
---------------------
Using iPod Convenience
---------------------
<Configure>
Start out by configuring /etc/default/ipod-convenience. All variables are documented there. If you installed this package
on a debian distribution, these should have been populated during package installation.
<Mount>
* First create the mountpoint that you defined in /etc/default/ipod-convenience. Be sure that your username has the rights
to write to this directory.
* Next, make sure that you have rights to mount fuse filesystems. If not, add yourself to the fuse group, and logout/in.
* Lastly, issue a mount like this (depending upon your device):
$ ipod-touch-mount
or
$ iphone-mount
This will then sync over the appropriate database information to your mount point, and create the directory structure
necessary for the device to work with libgpod3.
If you haven't defined a Firewire ID, it will be created at this time too.
Lastly, this will mount the music directory via sshfs.
<Unmounting>
* To umount the device issue one of these commands:
$ ipod-touch-umount
or
$ iphone-umount
These will both flush the currently active writes. The database for Music and artwork will be synced over and
if MobileMusicPlayer is active on your device, it will be restarted to take advantage of the newly present
database.
|