Pierra

Q: Does "open" Terminal command show me a pdf file under a SSH remote connection w/o downloading that pdf file?

Hello, I don't know how SSH works, but I would like to access a pdf file in my home Desktop (iMac) remotely (from a Macbook) without the need of actually downloading that pdf.

Can I create a SSH remote connection and type "open path/file.pdf" ?

MacBook Pro with Retina display, OS X Mavericks (10.9), null

Posted on May 3, 2015 3:37 AM

Close

Q: Does "open" Terminal command show me a pdf file under a SSH remote connection w/o downloading that pdf file?

  • All replies
  • Helpful answers

  • by Tony T1,

    Tony T1 Tony T1 May 3, 2015 5:05 AM in response to Pierra
    Level 6 (9,249 points)
    Mac OS X
    May 3, 2015 5:05 AM in response to Pierra

    The pdf will open on the remote machine if you use ssh.

    To view on your machine, you will need to mount the volume first

  • by VikingOSX,

    VikingOSX VikingOSX May 3, 2015 7:53 AM in response to Pierra
    Level 7 (20,899 points)
    Mac OS X
    May 3, 2015 7:53 AM in response to Pierra

    You could also use Back to My Mac to access the PDF on your home iMac from your remote location on your MacBook. For instance, the built-in OS X screen sharing (virtual network computing (VNC)) would let you have a screen session on your MacBook as though you were sitting in front of your iMac. That woud let you click on, and view the PDF on your MacBook screen, while remote.

  • by BobHarris,

    BobHarris BobHarris May 3, 2015 8:41 AM in response to Pierra
    Level 6 (19,437 points)
    Mac OS X
    May 3, 2015 8:41 AM in response to Pierra

    I don't know how SSH works,

    Think of it as a telephone call to a remote system.  Once you are there, anything you type is executed on the remote node.  If the command outputs text to the terminal, it will be sent back to you for display on your terminal session as text.  If the command you run (assuming this is a Mac), needs the GUI, it will be displayed on the remote system.

     

    Generally the 'open' command starts up a Mac GUI based app, so the output will be displayed on the remote Mac's screen.

     

    I would like to access a pdf file in my home Desktop (iMac) remotely (from a Macbook) without the need of actually downloading that pdf.

    As and say you can use mount the remote Mac's volume and option it that way.  However, that will really just copy the contents of the file to your Local Mac for display.

     

    idea to use VNC or Screen Sharing will send send the pixels from your remote display to your local system.  Whether this is more or less data than the PDF would depend on how large the PDF is and whether you display all or just a little of the PDF.

     

    If this is going to happen a lot, then go for mounting the remote volume and open it locally over file sharing, or just use the 'ssh' based 'scp' command to copy the file and open it locally (either will be fine).


    If this is once in awhile, screen sharing might be what you want to do, and having screen sharing working gives you lots of additional capabilities for remotely managing your Mac.

  • by Pierra,

    Pierra Pierra May 3, 2015 11:29 AM in response to BobHarris
    Level 1 (0 points)
    May 3, 2015 11:29 AM in response to BobHarris

    I have some GBs of pdf files I often need (the average size of a single file is ~ 20 MB), and I wondered if I could directly access them from my iMac instead of carrying around a HD.

    Then, SSH would make me download them on my macbook, right? Does it apply to Back To My Mac as well?

  • by BobHarris,

    BobHarris BobHarris May 3, 2015 3:31 PM in response to Pierra
    Level 6 (19,437 points)
    Mac OS X
    May 3, 2015 3:31 PM in response to Pierra

    I have some GBs of pdf files I often need (the average size of a single file is ~ 20 MB), and I wondered if I could directly access them from my iMac instead of carrying around a HD.

    Then, SSH would make me download them on my macbook, right? Does it apply to Back To My Mac as well?

    ssh (or rather the ssh based scp or sftp file transfer utilities) would need to be used before ssh based access could be used to view any single PDF file.  Of course you would only need to transfer the file you were interested in viewing at the moment.

     

    Back-to-My-Mac is a way to remotely mount your home disk on your Macbook.  Then the PDF files would reside on your home system, you could view the folder(s) on your Macbook, and double click on the one (or more) you wish to view on your Macbook.

     

    NOTE:  When you double click on such a PDF, the Macbook will need to read the contents of the PDF into memory via the Back-to-My-Mac connection so the Macbook can display it on your screen.  But this is only done when you need to view the file (or files).

     

    The other approach, is Screen Sharing (aka VNC), which can also be done using Back-to-My-Mac, allows your home Mac to read the PDF and display the contents, but Screen Sharing sends the home Mac's screen to the Macbook.  So you see the same things displayed on your home Mac also on your Macbook.

     

    I guess I should ask if your concern is managing the storage and keeping copies up-to-date, or if you are worried about network bandwidth and ISP data limits?  The answer to this would affect the answer.

  • by Pierra,

    Pierra Pierra May 4, 2015 1:57 AM in response to BobHarris
    Level 1 (0 points)
    May 4, 2015 1:57 AM in response to BobHarris

    My concern is managing the storage. I don't need to keep the copies up-to-date because I need those files only as someone needs a library: one goes, asks for a book, reads what's inside, puts the book back on the shelf and goes home. It would be nice to be able to upload some MBs every now and then, but the frequency of those updates is low and it doesn't annoy me doing it manually (I can access the iMac often). As far as the bandwidth limits, do I need a high upload bandwidth at home?

    Another concern is opening a hole in my router Firewall to access part  of my iMac datas through the Internet.

  • by BobHarris,

    BobHarris BobHarris May 4, 2015 5:46 AM in response to Pierra
    Level 6 (19,437 points)
    Mac OS X
    May 4, 2015 5:46 AM in response to Pierra

    My concern is managing the storage

    Then something like Back-to-My-Mac is idea.  You enable it via System Preferences -> iCloud -> Back to My Mac

    Set up and use Back to My Mac - Apple Support

    OS X Mavericks: Use Back to My Mac

    https://www.apple.com/support/icloud/back-to-my-mac/

     

    It would be nice to be able to upload some MBs every now and then

    Not a problem.  With Back-to-My-Mac you will be mounting your home Mac's disk read/write, so you can both access as well as store (or update) files on the home Mac from your remote location.

     

    As far as the bandwidth limits, do I need a high upload bandwidth at home?

    Not really.  If you have at least 1megabit/second uplink speeds, it should be OK, assuming your PDF files are not huge.  And may ISPs provide better than 1megabit/sec.  If you were going to be doing tons of data access read lots of large files, then the uplink speeds would be more important.

     

    You can always just try it, and if it seems to satisfy your needs, but seems a little slow, you can contact your ISP about increasing your uplinks speeds (which I'm sure they will be happy to do "for a price" ).

     

    Another concern is opening a hole in my router Firewall to access part  of my iMac datas through the Internet.

    Back-to-My-Mac on your Home Mac deals with crossing the router.  It basically uses a hand-off via an Apple server, so both your home and remote Mac's contact the Apple server which provides contact information, then your home and remote Macs negotiate a direct connection and do authorization (Apple is not involved in the authorization, just your 2 Macs).

     

    The connection that is established is encrypted between your 2 Macs (again, Apple is not involved).

     

    It would be wise to give your home account a strong password, but other than that you do not need to worry about security.

  • by VikingOSX,

    VikingOSX VikingOSX May 4, 2015 9:13 AM in response to Pierra
    Level 7 (20,899 points)
    Mac OS X
    May 4, 2015 9:13 AM in response to Pierra

    My main machine is a Mac mini with Mavericks. My secondary is a 2014 MacBook Air with Yosemite 10.10.3. At home, I use Virtual Network Computing (VNC), AKA Apple Screensharing at 300Mbps wireless to pop a full-size MBA screen on my 24" Mac mini monitor.

     

    Even with the lid closed. I can then copy on the MBA, and paste on the mini, or vice-versa. I can also drag and drop files between both machines via this VNC connection. Back to my Mac via iCloud, essentially lets you do the same thing remotely.

     

    On the mini, I dragged and dropped /System/Library/CoreServices/Screen Sharing onto my Dock where it stays. When I click this application, it pops a dialog asking for the host. All of the screen sharing preferences settings are on the MBA.