I ran scp -i ssh “ . ” using Go from my client machine, but it is returning “no such file or directory” [duplicate]2019 Community Moderator ElectionWhy is this curl command not working?fork/exec . no such file or directory exit status 1call 'go build' command from golang os.execcalling command with some arguments works but not with others bu wotrks from consoleHow do you get the output of a system command in Go?How to copy a file to a remote server in Python using SCP or SSH?How to scp in python?scp (secure copy) to ec2 instance without passwordSCP w/ ssh: copying a local file from windows to a remote server using scpHow to copy a folder from remote to local using scp?SSH SCP Local file to Remote in Terminal Mac Os XCan ssh and scp to ec2 linux instance but cannot scp from linux instance to local machineGolang SSH-Server: How to handle file transfer with scp?Go SSH server accepting file transfers via SCPHow to copy a file from one directory to another using “os/exec” package in GO

Recommendation letter by significant other if you worked with them professionally?

When a wind turbine does not produce enough electricity how does the power company compensate for the loss?

Why the color red for the Republican Party

Hotkey (or other quick way) to insert a keyframe for only one component of a vector-valued property?

Shifting between bemols (flats) and diesis (sharps)in the key signature

Are babies of evil humanoid species inherently evil?

Can you reject a postdoc offer after the PI has paid a large sum for flights/accommodation for your visit?

How to detect if C code (which needs 'extern C') is compiled in C++

Definition of Statistic

Filtering SOQL results with optional conditionals

Does a warlock using the Darkness/Devil's Sight combo still have advantage on ranged attacks against a target outside the Darkness?

Are tamper resistant receptacles really safer?

Motivation for Zeta Function of an Algebraic Variety

Declaring and defining template, and specialising them

If I receive an SOS signal, what is the proper response?

'The literal of type int is out of range' con número enteros pequeños (2 dígitos)

What are actual Tesla M60 models used by AWS?

What are some noteworthy "mic-drop" moments in math?

Reversed Sudoku

Should I tell my boss the work he did was worthless

Vocabulary for giving just numbers, not a full answer

Do f-stop and exposure time perfectly cancel?

How are showroom/display vehicles prepared?

Conservation of Mass and Energy



I ran scp -i ssh “ . ” using Go from my client machine, but it is returning “no such file or directory” [duplicate]



2019 Community Moderator ElectionWhy is this curl command not working?fork/exec . no such file or directory exit status 1call 'go build' command from golang os.execcalling command with some arguments works but not with others bu wotrks from consoleHow do you get the output of a system command in Go?How to copy a file to a remote server in Python using SCP or SSH?How to scp in python?scp (secure copy) to ec2 instance without passwordSCP w/ ssh: copying a local file from windows to a remote server using scpHow to copy a folder from remote to local using scp?SSH SCP Local file to Remote in Terminal Mac Os XCan ssh and scp to ec2 linux instance but cannot scp from linux instance to local machineGolang SSH-Server: How to handle file transfer with scp?Go SSH server accepting file transfers via SCPHow to copy a file from one directory to another using “os/exec” package in GO










-1
















This question already has an answer here:



  • fork/exec . no such file or directory exit status 1

    1 answer



  • call 'go build' command from golang os.exec

    1 answer



  • Why is this curl command not working?

    2 answers



  • calling command with some arguments works but not with others bu wotrks from console

    1 answer



How to execute the scp -i ssh " . " using Go?



I have used the following code snippet.



cmd := exec.Command("scp -i dragonstone.pem <user>@ubuntu:<file location> .")
err = cmd.Run()









share|improve this question















marked as duplicate by JimB go
Users with the  go badge can single-handedly close go questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 7 at 18:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 1





    see this answer

    – colminator
    Mar 7 at 2:21












  • Please edit your question to show the exact error message that you're getting from scp. Don't paraphrase it. And what happens when you run that scp command interactively, instead of through go?

    – Kenster
    Mar 7 at 13:32















-1
















This question already has an answer here:



  • fork/exec . no such file or directory exit status 1

    1 answer



  • call 'go build' command from golang os.exec

    1 answer



  • Why is this curl command not working?

    2 answers



  • calling command with some arguments works but not with others bu wotrks from console

    1 answer



How to execute the scp -i ssh " . " using Go?



I have used the following code snippet.



cmd := exec.Command("scp -i dragonstone.pem <user>@ubuntu:<file location> .")
err = cmd.Run()









share|improve this question















marked as duplicate by JimB go
Users with the  go badge can single-handedly close go questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 7 at 18:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.













  • 1





    see this answer

    – colminator
    Mar 7 at 2:21












  • Please edit your question to show the exact error message that you're getting from scp. Don't paraphrase it. And what happens when you run that scp command interactively, instead of through go?

    – Kenster
    Mar 7 at 13:32













-1












-1








-1









This question already has an answer here:



  • fork/exec . no such file or directory exit status 1

    1 answer



  • call 'go build' command from golang os.exec

    1 answer



  • Why is this curl command not working?

    2 answers



  • calling command with some arguments works but not with others bu wotrks from console

    1 answer



How to execute the scp -i ssh " . " using Go?



I have used the following code snippet.



cmd := exec.Command("scp -i dragonstone.pem <user>@ubuntu:<file location> .")
err = cmd.Run()









share|improve this question

















This question already has an answer here:



  • fork/exec . no such file or directory exit status 1

    1 answer



  • call 'go build' command from golang os.exec

    1 answer



  • Why is this curl command not working?

    2 answers



  • calling command with some arguments works but not with others bu wotrks from console

    1 answer



How to execute the scp -i ssh " . " using Go?



I have used the following code snippet.



cmd := exec.Command("scp -i dragonstone.pem <user>@ubuntu:<file location> .")
err = cmd.Run()




This question already has an answer here:



  • fork/exec . no such file or directory exit status 1

    1 answer



  • call 'go build' command from golang os.exec

    1 answer



  • Why is this curl command not working?

    2 answers



  • calling command with some arguments works but not with others bu wotrks from console

    1 answer







go scp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 6:35









Flimzy

39.5k106699




39.5k106699










asked Mar 7 at 2:11









Raja GopalRaja Gopal

11




11




marked as duplicate by JimB go
Users with the  go badge can single-handedly close go questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 7 at 18:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by JimB go
Users with the  go badge can single-handedly close go questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 7 at 18:01


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 1





    see this answer

    – colminator
    Mar 7 at 2:21












  • Please edit your question to show the exact error message that you're getting from scp. Don't paraphrase it. And what happens when you run that scp command interactively, instead of through go?

    – Kenster
    Mar 7 at 13:32












  • 1





    see this answer

    – colminator
    Mar 7 at 2:21












  • Please edit your question to show the exact error message that you're getting from scp. Don't paraphrase it. And what happens when you run that scp command interactively, instead of through go?

    – Kenster
    Mar 7 at 13:32







1




1





see this answer

– colminator
Mar 7 at 2:21






see this answer

– colminator
Mar 7 at 2:21














Please edit your question to show the exact error message that you're getting from scp. Don't paraphrase it. And what happens when you run that scp command interactively, instead of through go?

– Kenster
Mar 7 at 13:32





Please edit your question to show the exact error message that you're getting from scp. Don't paraphrase it. And what happens when you run that scp command interactively, instead of through go?

– Kenster
Mar 7 at 13:32












1 Answer
1






active

oldest

votes


















0














I will do this.



package main

import (
"fmt"
"os"
"os/exec"
)

func main()
cmd := "scp"
args := []string"-i", "dragonstone.pem", "<user>@ubuntu:<file location>", "."
if err := exec.Command(cmd, args...).Run(); err != nil
fmt.Fprintln(os.Stderr, err)
os.Exit(1)

fmt.Println("Successfully.")






share|improve this answer








New contributor




devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I will do this.



    package main

    import (
    "fmt"
    "os"
    "os/exec"
    )

    func main()
    cmd := "scp"
    args := []string"-i", "dragonstone.pem", "<user>@ubuntu:<file location>", "."
    if err := exec.Command(cmd, args...).Run(); err != nil
    fmt.Fprintln(os.Stderr, err)
    os.Exit(1)

    fmt.Println("Successfully.")






    share|improve this answer








    New contributor




    devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0














      I will do this.



      package main

      import (
      "fmt"
      "os"
      "os/exec"
      )

      func main()
      cmd := "scp"
      args := []string"-i", "dragonstone.pem", "<user>@ubuntu:<file location>", "."
      if err := exec.Command(cmd, args...).Run(); err != nil
      fmt.Fprintln(os.Stderr, err)
      os.Exit(1)

      fmt.Println("Successfully.")






      share|improve this answer








      New contributor




      devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        0












        0








        0







        I will do this.



        package main

        import (
        "fmt"
        "os"
        "os/exec"
        )

        func main()
        cmd := "scp"
        args := []string"-i", "dragonstone.pem", "<user>@ubuntu:<file location>", "."
        if err := exec.Command(cmd, args...).Run(); err != nil
        fmt.Fprintln(os.Stderr, err)
        os.Exit(1)

        fmt.Println("Successfully.")






        share|improve this answer








        New contributor




        devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        I will do this.



        package main

        import (
        "fmt"
        "os"
        "os/exec"
        )

        func main()
        cmd := "scp"
        args := []string"-i", "dragonstone.pem", "<user>@ubuntu:<file location>", "."
        if err := exec.Command(cmd, args...).Run(); err != nil
        fmt.Fprintln(os.Stderr, err)
        os.Exit(1)

        fmt.Println("Successfully.")







        share|improve this answer








        New contributor




        devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Mar 7 at 4:13









        devdotlogdevdotlog

        17010




        17010




        New contributor




        devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        devdotlog is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.















            Popular posts from this blog

            Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

            2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

            Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme