Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
05-31-2011, 05:37 PM
|
#1
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Rep:
|
SSHing into an iPod, how do I display/open files and how do I move them to filesystem
Well, figuring out that just plugging in my iPod in Ubuntu only shows certain files, music, and images, the other important and "Juicy" stuff that I've saved on iFile is there, like PDFs and documents and whatnot. Should I just take the easy way out and move everything from my iPod to a file that can be easily read *Yet hard to locate on my iPod* so I can just transfer it from there, or should I do it the hard way and try to find out how? Well, I've always wanted to learn how to move files over a Secure Shell, so I guess now would be the best time to learn. What commands do I have to use to move files from one machine/device to another? Should I copy the files first before attempting to move them? Are there any switching accompanying the commands and can you explain what they do so I know what and why I'll be using them so I can consider them in future use. Also, in order to SSH into it, I had to do it as root Anyway, another thing, if you could be so kind, this is optional, could you tell me more about how SSH works? You don't need to though, I only need an answer for SSH commands.
|
|
|
|
05-31-2011, 08:34 PM
|
#2
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,604
|
To ssh to a device, that device needs to be running and ssh server/daemon. I've never used and ipod, but I would be amazed if they run an ssh daemon: have you read/heard something that indicates that they do?
Anyway, you can't really "move" files, but you can "copy" them (but I guess by deleting the local file after copying it you have effectively moved it). scp is the classic command for copying files over ssh, but you can also use things like rsync: eg "rsync -e ssh". Other fun things you can do include mounting a remote file system with fuse/sshfs.
Evo2.
|
|
|
|
05-31-2011, 08:53 PM
|
#3
|
|
Member
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Rep: 
|
Quote:
|
I would be amazed if they run an ssh daemon
|
Actually, you can install an OpenSSH server on an iPhone/iPod Touch, but it involves "jailbreaking" the device (i.e. allowing installation of apps outside Apple's App Store).
|
|
|
|
05-31-2011, 09:01 PM
|
#4
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by MrCode
Actually, you can install an OpenSSH server on an iPhone/iPod Touch, but it involves "jailbreaking" the device (i.e. allowing installation of apps outside Apple's App Store).
|
Which is what I did, I jailbroke it a while ago.
|
|
|
|
05-31-2011, 09:07 PM
|
#5
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
To ssh to a device, that device needs to be running and ssh server/daemon. I've never used and ipod, but I would be amazed if they run an ssh daemon: have you read/heard something that indicates that they do?
Anyway, you can't really "move" files, but you can "copy" them (but I guess by deleting the local file after copying it you have effectively moved it). scp is the classic command for copying files over ssh, but you can also use things like rsync: eg "rsync -e ssh". Other fun things you can do include mounting a remote file system with fuse/sshfs.
Evo2.
|
Code:
theif519@theif519-Inspiron-580s:~$ sudo -i
[sudo] password for theif519:
root@theif519-Inspiron-580s:~# ssh 192.168.1.2
root@192.168.1.2's password:
theif519s-iPod:~ root# ls
Documents/ Library/ Media/ NinjaGa.nes Ninja_Gaiden_1.zip
theif519s-iPod:~ root# cd /
theif519s-iPod:/ root# ls
Applications@ Library/ Thumbs.db bin/ cores/ etc@ mnt/ sbin/ usr/
Developer/ System/ User@ boot/ dev/ lib/ private/ tmp@ var@
theif519s-iPod:/ root# cd var
theif519s-iPod:/var root# ls
Keychains/ cache/ include/ log/ root/ vm/
Managed\ Preferences/ db/ keybags/ logs/ run/ wireless/
MobileDevice/ ea/ lib/ mobile/ spool/
audit/ empty/ local/ msgs/ stash/
backups/ folders/ lock/ preferences/ tmp/
theif519s-iPod:/var root# cd ..
theif519s-iPod:/ root# ls
Applications@ Library/ Thumbs.db bin/ cores/ etc@ mnt/ sbin/ usr/
Developer/ System/ User@ boot/ dev/ lib/ private/ tmp@ var@
theif519s-iPod:/ root# cd User
theif519s-iPod:/User root# ls
Applications/ Documents/ Library/ Media/ loader_package.tar
theif519s-iPod:/User root# cd Documents
theif519s-iPod:/User/Documents root# cd
theif519s-iPod:~ root# ls
Documents/ Library/ Media/ NinjaGa.nes Ninja_Gaiden_1.zip
theif519s-iPod:~ root# cd Documents
theif519s-iPod:~/Documents root# ls
admob/
theif519s-iPod:~/Documents root# cd ..
theif519s-iPod:~ root# cd ..
theif519s-iPod:/var root# cd /
theif519s-iPod:/ root# ls
Applications@ Library/ Thumbs.db bin/ cores/ etc@ mnt/ sbin/ usr/
Developer/ System/ User@ boot/ dev/ lib/ private/ tmp@ var@
theif519s-iPod:/ root# cd User
theif519s-iPod:/User root# ls
Applications/ Documents/ Library/ Media/ loader_package.tar
theif519s-iPod:/User root# cd Documents
theif519s-iPod:/User/Documents root# ls
Intro_To_Linux.pdf Linux_Command-Line.pdf Rute_Users_Guide.pdf admob/
KLPhotoMosaic/ Linux_Shell.pdf Slackware_Guide.pdf mobclix.db
theif519s-iPod:/User/Documents root# rsync -e ssh
-sh: rsync: command not found
theif519s-iPod:/User/Documents root#
rsync wasn't recognized... do I have to do it in my own terminal or in the SSH'd iPod Terminal? Is there a front-end for SSHing that's on Linux?
|
|
|
|
05-31-2011, 09:31 PM
|
#6
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,604
|
There are many ssh client front ends. I personally prefer just using ssh from the command line. However as I understand it many file managers have ssh built in so you can "drag-n-drop" files in the same way you would normally use a file manager.
One thing I thought I should mention is that you should not need to be root on you pc to ssh to your ipod, you just need to specify that the user on the ipod is root:
Eg
Code:
theif519@theif519-Inspiron-580s:~$ ssh root@192.168.1.2
It seems that rsync is not installed on your ipod. Also if it was you would use it something like:
Code:
theif519@theif519-Inspiron-580s:~$ rsync -e ssh /home/theif519/Music root@192.168.1.2:/User/Media
Evo2.
|
|
|
1 members found this post helpful.
|
05-31-2011, 09:52 PM
|
#7
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,604
|
Ok, just realized that what you want to do is copy files from your ipod onto your computer. If for example you wanted to copy all the files in /User/Documents you could do the following
Code:
theif519@theif519-Inspiron-580s:~$ scp -r root@192.1681.2.:/User/Documents .
Evo2.
|
|
|
1 members found this post helpful.
|
06-01-2011, 03:50 PM
|
#8
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
Ok, just realized that what you want to do is copy files from your ipod onto your computer. If for example you wanted to copy all the files in /User/Documents you could do the following
Code:
theif519@theif519-Inspiron-580s:~$ scp -r root@192.1681.2.:/User/Documents .
Evo2.
|
Code:
theif519@theif519-Inspiron-580s:~$ ssh root@192.168.1.2
ssh: connect to host 192.168.1.2 port 22: No route to host
theif519@theif519-Inspiron-580s:~$ ssh root@192.168.1.2
root@192.168.1.2's password:
theif519s-iPod:~ root# scp -r root@192.1681.2.:/User/Documents
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
theif519s-iPod:~ root# cd /User/Documents
theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
ssh: Could not resolve hostname 192.1681.2.: nodename nor servname provided, or not known
theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
It didn't work...
|
|
|
|
06-01-2011, 03:55 PM
|
#9
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,604
|
You are running the command from the wrong machine.
Evo2.
|
|
|
|
06-01-2011, 04:04 PM
|
#10
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
You are running the command from the wrong machine.
Evo2.
|
Code:
theif519@theif519-Inspiron-580s:~$ theif519@theif519-Inspiron-580s:~$ ssh root@192.168.1.2
theif519@theif519-Inspiron-580s:~$: command not found
theif519@theif519-Inspiron-580s:~$ ssh: connect to host 192.168.1.2 port 22: No route to host
No command 'ssh:' found, did you mean:
Command 'sshd' from package 'openssh-server' (main)
Command 'ssh' from package 'openssh-client' (main)
Command 'sshm' from package 'sshm' (universe)
ssh:: command not found
theif519@theif519-Inspiron-580s:~$ theif519@theif519-Inspiron-580s:~$ ssh root@192.168.1.2
theif519@theif519-Inspiron-580s:~$: command not found
theif519@theif519-Inspiron-580s:~$ root@192.168.1.2's password:
> theif519s-iPod:~ root# scp -r root@192.1681.2.:/User/Documents
> usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
> [-l limit] [-o ssh_option] [-P port] [-S program]
> [[user@]host1:]file1 ... [[user@]host2:]file2
> theif519s-iPod:~ root# cd /User/Documents
> theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
> ssh: Could not resolve hostname 192.1681.2.: nodename nor servname provided, or not known
> theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
> root@192.168.1.2's password:
theif519s-iPod:~ root# scp -r root@192.1681.2.:/User/Documents
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
theif519s-iPod:~ root# cd /User/Documents
theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
ssh: Could not resolve hostname 192.1681.2.: nodename nor servname provided, or not known
theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents /home/theif519/Documents
bash: root@192.168.1.2s password:
theif519s-iPod:~ root# scp -r root@192.1681.2.:/User/Documents
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
theif519s-iPod:~ root# cd /User/Documents
theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
ssh: Could not resolve hostname 192.1681.2.: nodename nor servname provided, or not known
theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents .
root@192.168.1.2s: No such file or directory
theif519s-iPod:~: command not found
usage:: command not found
[-l: command not found
[[user@]host1:]file1: command not found
theif519s-iPod:~: command not found
bash: theif519s-iPod:/User/Documents: No such file or directory
No command 'ssh:' found, did you mean:
Command 'sshd' from package 'openssh-server' (main)
Command 'ssh' from package 'openssh-client' (main)
Command 'sshm' from package 'sshm' (universe)
ssh:: command not found
bash: theif519s-iPod:/User/Documents: No such file or directory
theif519@theif519-Inspiron-580s:~$ theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents /Home/theif519/Documents
bash: theif519s-iPod:/User/Documents: No such file or directory
theif519@theif519-Inspiron-580s:~$ theif519s-iPod:/User/Documents root# scp -r root@192.1681.2.:/User/Documents /home/theif519/Documents
bash: theif519s-iPod:/User/Documents: No such file or directory
theif519@theif519-Inspiron-580s:~$ scp -r theif519s-iPod:/User/Documents theif519@192.168.1.4:/home/theif519/Documents
theif519@theif519-Inspiron-580s:~$ $ scp -r root@192.168.1.4:/User/Documents theif519@192.168.1.4:/home/theif519/Documents
throot@192.168.1.4's password:
Permission denied, please try again.
throot@192.168.1.4's password:
theif519@theif519-Inspiron-580s:~$ scp -r root@192.168.1.4:/User/Documents theif519@192.168.1.4:/home/theif519/Documents
root@192.168.1.4's password:
Permission denied, please try again.
root@192.168.1.4's password:
theif519@theif519-Inspiron-580s:~$ scp -r root@192.168.1.2:/User/Documents theif519@192.168.1.4:/home/theif519/Documents
root@192.168.1.2's password:
Host key verification failed.
lost connection
theif519@theif519-Inspiron-580s:~$
Sorry if I'm being a bit annoying.
|
|
|
|
06-01-2011, 04:25 PM
|
#11
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,604
|
You are still trying to run the scp on the ipod. Look at what the prompt is in the command that I posted.
Evo2.
|
|
|
1 members found this post helpful.
|
06-01-2011, 04:35 PM
|
#12
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
Quote:
Originally Posted by evo2
You are still trying to run the scp on the ipod. Look at what the prompt is in the command that I posted.
Evo2.
|
I did it! Thank you so much! But I've a question, where was it copied to?
|
|
|
|
06-01-2011, 04:37 PM
|
#13
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
Nevermind, found it in my documents section, but how did it know to send it? My present direction was /home/theif519 not /home/theif519/Documents does it automatically allocate it to a certain directory that it thinks it's supposed to go to? Also, what does the "." mean at the end of the command?
|
|
|
|
06-01-2011, 04:41 PM
|
#14
|
|
Senior Member
Registered: Jan 2009
Location: Japan
Distribution: Debian
Posts: 3,604
|
The "." at the end is the destination for the files. So, they should have ended up in the directory you were in when you ran the command. Please try it again to confirm this.
Evo2.
|
|
|
|
06-01-2011, 04:45 PM
|
#15
|
|
Member
Registered: Mar 2011
Location: Philadelphia, PA
Distribution: Kubuntu 12.10
Posts: 255
Original Poster
Rep:
|
OH! I see what it did, it must have detected a file with the same name and instead of overwriting it, copied the subdirectories into it! Awesome! Also, I want to know how I do it the other way around? Do I do it from inside the iPod's side of the SSH Terminal or from my own?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:28 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|