Using scp to transfer files to an android device












1















SSHDroid lets an android device function as an ssh server. vSSH is an ssh client for android devices.



I have a file on a remote server that I want to transfer to my android device over ssh, only using the android device in the process.



Using this setup, I tried an scp from the android device




scp remote_user@remote_host:file file




After being prompted for the password I got permission denied.



I then tried to transfer it from the remote server




scp -P 2222 file root@SSHDroid-ip:/mnt/extSdCard/file




Without being prompted for the password I now get the message that the network (of the android device) is unreachable: lost connection.



Is this a permission problem? I have transferred files over ssh from the remote server before, so I suppose the problem is on the side of the android device.










share|improve this question























  • "Permission denied" where? Reading the file remotely? Authenticating? Writing the file locally? For your second attempt, did you configure the android's ssh server to run on port 2222? Are you doing this over a LAN or over the internet?

    – Jason C
    Jul 17 '14 at 3:36











  • I get the permission denied message after being prompted for the password on the remote server. file: Permission denied. So I suppose it got denied at the remote server? On the first attempt I am reading the file remotely, while using vSSH on the android device. On the second attempt I am on the remote server and writing the file to the android device. SSHDroid does indeed default to port 2222. I am doing it over LAN. Moreover, since I can connect to the android device (using the android device itself) with vSSH via port 2222 I do not think that the port number is the problem.

    – Mussé Redi
    Jul 17 '14 at 3:49













  • What happens if you do touch file on the Android device? Or if Android doesn't have touch, something like echo abc > file?

    – Jason C
    Jul 17 '14 at 3:58











  • I can not seem to 'touch' the file (which is on the remote server) from the android device: No such file or directory.

    – Mussé Redi
    Jul 17 '14 at 4:10











  • I mean locally. In your first example you have scp user@remote:remotefile localfile. Can you actually write to localfile? Because if you go to that directory in whatever Android console you are using, and touch localfile or echo abc > localfile gives you a permission denied error, then this tells us you do not have write permissions to that location on the Android.

    – Jason C
    Jul 17 '14 at 4:17
















1















SSHDroid lets an android device function as an ssh server. vSSH is an ssh client for android devices.



I have a file on a remote server that I want to transfer to my android device over ssh, only using the android device in the process.



Using this setup, I tried an scp from the android device




scp remote_user@remote_host:file file




After being prompted for the password I got permission denied.



I then tried to transfer it from the remote server




scp -P 2222 file root@SSHDroid-ip:/mnt/extSdCard/file




Without being prompted for the password I now get the message that the network (of the android device) is unreachable: lost connection.



Is this a permission problem? I have transferred files over ssh from the remote server before, so I suppose the problem is on the side of the android device.










share|improve this question























  • "Permission denied" where? Reading the file remotely? Authenticating? Writing the file locally? For your second attempt, did you configure the android's ssh server to run on port 2222? Are you doing this over a LAN or over the internet?

    – Jason C
    Jul 17 '14 at 3:36











  • I get the permission denied message after being prompted for the password on the remote server. file: Permission denied. So I suppose it got denied at the remote server? On the first attempt I am reading the file remotely, while using vSSH on the android device. On the second attempt I am on the remote server and writing the file to the android device. SSHDroid does indeed default to port 2222. I am doing it over LAN. Moreover, since I can connect to the android device (using the android device itself) with vSSH via port 2222 I do not think that the port number is the problem.

    – Mussé Redi
    Jul 17 '14 at 3:49













  • What happens if you do touch file on the Android device? Or if Android doesn't have touch, something like echo abc > file?

    – Jason C
    Jul 17 '14 at 3:58











  • I can not seem to 'touch' the file (which is on the remote server) from the android device: No such file or directory.

    – Mussé Redi
    Jul 17 '14 at 4:10











  • I mean locally. In your first example you have scp user@remote:remotefile localfile. Can you actually write to localfile? Because if you go to that directory in whatever Android console you are using, and touch localfile or echo abc > localfile gives you a permission denied error, then this tells us you do not have write permissions to that location on the Android.

    – Jason C
    Jul 17 '14 at 4:17














1












1








1








SSHDroid lets an android device function as an ssh server. vSSH is an ssh client for android devices.



I have a file on a remote server that I want to transfer to my android device over ssh, only using the android device in the process.



Using this setup, I tried an scp from the android device




scp remote_user@remote_host:file file




After being prompted for the password I got permission denied.



I then tried to transfer it from the remote server




scp -P 2222 file root@SSHDroid-ip:/mnt/extSdCard/file




Without being prompted for the password I now get the message that the network (of the android device) is unreachable: lost connection.



Is this a permission problem? I have transferred files over ssh from the remote server before, so I suppose the problem is on the side of the android device.










share|improve this question














SSHDroid lets an android device function as an ssh server. vSSH is an ssh client for android devices.



I have a file on a remote server that I want to transfer to my android device over ssh, only using the android device in the process.



Using this setup, I tried an scp from the android device




scp remote_user@remote_host:file file




After being prompted for the password I got permission denied.



I then tried to transfer it from the remote server




scp -P 2222 file root@SSHDroid-ip:/mnt/extSdCard/file




Without being prompted for the password I now get the message that the network (of the android device) is unreachable: lost connection.



Is this a permission problem? I have transferred files over ssh from the remote server before, so I suppose the problem is on the side of the android device.







ssh android file-permissions file-transfer scp






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 17 '14 at 3:28









Mussé RediMussé Redi

137110




137110













  • "Permission denied" where? Reading the file remotely? Authenticating? Writing the file locally? For your second attempt, did you configure the android's ssh server to run on port 2222? Are you doing this over a LAN or over the internet?

    – Jason C
    Jul 17 '14 at 3:36











  • I get the permission denied message after being prompted for the password on the remote server. file: Permission denied. So I suppose it got denied at the remote server? On the first attempt I am reading the file remotely, while using vSSH on the android device. On the second attempt I am on the remote server and writing the file to the android device. SSHDroid does indeed default to port 2222. I am doing it over LAN. Moreover, since I can connect to the android device (using the android device itself) with vSSH via port 2222 I do not think that the port number is the problem.

    – Mussé Redi
    Jul 17 '14 at 3:49













  • What happens if you do touch file on the Android device? Or if Android doesn't have touch, something like echo abc > file?

    – Jason C
    Jul 17 '14 at 3:58











  • I can not seem to 'touch' the file (which is on the remote server) from the android device: No such file or directory.

    – Mussé Redi
    Jul 17 '14 at 4:10











  • I mean locally. In your first example you have scp user@remote:remotefile localfile. Can you actually write to localfile? Because if you go to that directory in whatever Android console you are using, and touch localfile or echo abc > localfile gives you a permission denied error, then this tells us you do not have write permissions to that location on the Android.

    – Jason C
    Jul 17 '14 at 4:17



















  • "Permission denied" where? Reading the file remotely? Authenticating? Writing the file locally? For your second attempt, did you configure the android's ssh server to run on port 2222? Are you doing this over a LAN or over the internet?

    – Jason C
    Jul 17 '14 at 3:36











  • I get the permission denied message after being prompted for the password on the remote server. file: Permission denied. So I suppose it got denied at the remote server? On the first attempt I am reading the file remotely, while using vSSH on the android device. On the second attempt I am on the remote server and writing the file to the android device. SSHDroid does indeed default to port 2222. I am doing it over LAN. Moreover, since I can connect to the android device (using the android device itself) with vSSH via port 2222 I do not think that the port number is the problem.

    – Mussé Redi
    Jul 17 '14 at 3:49













  • What happens if you do touch file on the Android device? Or if Android doesn't have touch, something like echo abc > file?

    – Jason C
    Jul 17 '14 at 3:58











  • I can not seem to 'touch' the file (which is on the remote server) from the android device: No such file or directory.

    – Mussé Redi
    Jul 17 '14 at 4:10











  • I mean locally. In your first example you have scp user@remote:remotefile localfile. Can you actually write to localfile? Because if you go to that directory in whatever Android console you are using, and touch localfile or echo abc > localfile gives you a permission denied error, then this tells us you do not have write permissions to that location on the Android.

    – Jason C
    Jul 17 '14 at 4:17

















"Permission denied" where? Reading the file remotely? Authenticating? Writing the file locally? For your second attempt, did you configure the android's ssh server to run on port 2222? Are you doing this over a LAN or over the internet?

– Jason C
Jul 17 '14 at 3:36





"Permission denied" where? Reading the file remotely? Authenticating? Writing the file locally? For your second attempt, did you configure the android's ssh server to run on port 2222? Are you doing this over a LAN or over the internet?

– Jason C
Jul 17 '14 at 3:36













I get the permission denied message after being prompted for the password on the remote server. file: Permission denied. So I suppose it got denied at the remote server? On the first attempt I am reading the file remotely, while using vSSH on the android device. On the second attempt I am on the remote server and writing the file to the android device. SSHDroid does indeed default to port 2222. I am doing it over LAN. Moreover, since I can connect to the android device (using the android device itself) with vSSH via port 2222 I do not think that the port number is the problem.

– Mussé Redi
Jul 17 '14 at 3:49







I get the permission denied message after being prompted for the password on the remote server. file: Permission denied. So I suppose it got denied at the remote server? On the first attempt I am reading the file remotely, while using vSSH on the android device. On the second attempt I am on the remote server and writing the file to the android device. SSHDroid does indeed default to port 2222. I am doing it over LAN. Moreover, since I can connect to the android device (using the android device itself) with vSSH via port 2222 I do not think that the port number is the problem.

– Mussé Redi
Jul 17 '14 at 3:49















What happens if you do touch file on the Android device? Or if Android doesn't have touch, something like echo abc > file?

– Jason C
Jul 17 '14 at 3:58





What happens if you do touch file on the Android device? Or if Android doesn't have touch, something like echo abc > file?

– Jason C
Jul 17 '14 at 3:58













I can not seem to 'touch' the file (which is on the remote server) from the android device: No such file or directory.

– Mussé Redi
Jul 17 '14 at 4:10





I can not seem to 'touch' the file (which is on the remote server) from the android device: No such file or directory.

– Mussé Redi
Jul 17 '14 at 4:10













I mean locally. In your first example you have scp user@remote:remotefile localfile. Can you actually write to localfile? Because if you go to that directory in whatever Android console you are using, and touch localfile or echo abc > localfile gives you a permission denied error, then this tells us you do not have write permissions to that location on the Android.

– Jason C
Jul 17 '14 at 4:17





I mean locally. In your first example you have scp user@remote:remotefile localfile. Can you actually write to localfile? Because if you go to that directory in whatever Android console you are using, and touch localfile or echo abc > localfile gives you a permission denied error, then this tells us you do not have write permissions to that location on the Android.

– Jason C
Jul 17 '14 at 4:17










1 Answer
1






active

oldest

votes


















1














Your scp from android to the remote server permission denied means:




  • You didn't have the password right

  • You don't have permission to read the remote file or

  • You don't have permission to write the local file


Usually the answer is the third as android differs from most unix in who can write what where.



(I know this is answered in the comments, but if you don't mark it answered more people will waste time reading it like I did!)






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f784183%2fusing-scp-to-transfer-files-to-an-android-device%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Your scp from android to the remote server permission denied means:




    • You didn't have the password right

    • You don't have permission to read the remote file or

    • You don't have permission to write the local file


    Usually the answer is the third as android differs from most unix in who can write what where.



    (I know this is answered in the comments, but if you don't mark it answered more people will waste time reading it like I did!)






    share|improve this answer




























      1














      Your scp from android to the remote server permission denied means:




      • You didn't have the password right

      • You don't have permission to read the remote file or

      • You don't have permission to write the local file


      Usually the answer is the third as android differs from most unix in who can write what where.



      (I know this is answered in the comments, but if you don't mark it answered more people will waste time reading it like I did!)






      share|improve this answer


























        1












        1








        1







        Your scp from android to the remote server permission denied means:




        • You didn't have the password right

        • You don't have permission to read the remote file or

        • You don't have permission to write the local file


        Usually the answer is the third as android differs from most unix in who can write what where.



        (I know this is answered in the comments, but if you don't mark it answered more people will waste time reading it like I did!)






        share|improve this answer













        Your scp from android to the remote server permission denied means:




        • You didn't have the password right

        • You don't have permission to read the remote file or

        • You don't have permission to write the local file


        Usually the answer is the third as android differs from most unix in who can write what where.



        (I know this is answered in the comments, but if you don't mark it answered more people will waste time reading it like I did!)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 25 at 16:20









        Derek S.Derek S.

        664




        664






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f784183%2fusing-scp-to-transfer-files-to-an-android-device%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown