ssh scp command copies files from remote to remote but not to local machineTrouble connecting to a local machine through a remote serverSSH: Access local file (redirect local file contents) via remote SSH consoleTrying to SCP from Local Mac to Amazon AWS Linux Machinessh login successful, but scp password gives me “Permission denied”Force SFTP/SCP to copy files with a remote directory's permissionShell script from local machine to execute command in remote machine, then continue on the local machinessh forced command: sftp/scp onlyCopy file from remote SSH to local without SSH client on remotePermission denied when using scp, but able to sshDelete remote dir and transfer replacement dir from local
What is the word for reserving something for yourself before others do?
Why is consensus so controversial in Britain?
Do I have a twin with permutated remainders?
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
Is there a hemisphere-neutral way of specifying a season?
Why are electrically insulating heatsinks so rare? Is it just cost?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
How can saying a song's name be a copyright violation?
Why do I get two different answers for this counting problem?
What killed these X2 caps?
What does it mean to describe someone as a butt steak?
Blender 2.8 I can't see vertices, edges or faces in edit mode
What is going on with Captain Marvel's blood colour?
Neighboring nodes in the network
Python: return float 1.0 as int 1 but float 1.5 as float 1.5
90's TV series where a boy goes to another dimension through portal near power lines
AES: Why is it a good practice to use only the first 16bytes of a hash for encryption?
How much of data wrangling is a data scientist's job?
Brothers & sisters
Facing a paradox: Earnshaw's theorem in one dimension
Etiquette around loan refinance - decision is going to cost first broker a lot of money
Diode datasheet reading
Reserved de-dupe rules
Should I tell management that I intend to leave due to bad software development practices?
ssh scp command copies files from remote to remote but not to local machine
Trouble connecting to a local machine through a remote serverSSH: Access local file (redirect local file contents) via remote SSH consoleTrying to SCP from Local Mac to Amazon AWS Linux Machinessh login successful, but scp password gives me “Permission denied”Force SFTP/SCP to copy files with a remote directory's permissionShell script from local machine to execute command in remote machine, then continue on the local machinessh forced command: sftp/scp onlyCopy file from remote SSH to local without SSH client on remotePermission denied when using scp, but able to sshDelete remote dir and transfer replacement dir from local
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I need help with this one please. I couldn't connect with any FTP client to a remote server given by a client. It would be SFTP protocol, but I could never connect.
With ssh user@login.microsites.companyname.com I'm able to connect.
After connecting I can use ls to list the directories and I get prod dev stage which refers to the three sudomains.
If I go inside prod I get www tmp log.
My task would be to copy the remote www directory to my local machine. However I'm not able to.
My idea was after ssh connection to scp user@login.microsites.companyname.com:/prod/www /Desktop which should copy the files to my local Desktop.
However what it does is copying the files to the remote machine creating a directory "Desktop" which has the copied files.
ssh scp
add a comment |
I need help with this one please. I couldn't connect with any FTP client to a remote server given by a client. It would be SFTP protocol, but I could never connect.
With ssh user@login.microsites.companyname.com I'm able to connect.
After connecting I can use ls to list the directories and I get prod dev stage which refers to the three sudomains.
If I go inside prod I get www tmp log.
My task would be to copy the remote www directory to my local machine. However I'm not able to.
My idea was after ssh connection to scp user@login.microsites.companyname.com:/prod/www /Desktop which should copy the files to my local Desktop.
However what it does is copying the files to the remote machine creating a directory "Desktop" which has the copied files.
ssh scp
add a comment |
I need help with this one please. I couldn't connect with any FTP client to a remote server given by a client. It would be SFTP protocol, but I could never connect.
With ssh user@login.microsites.companyname.com I'm able to connect.
After connecting I can use ls to list the directories and I get prod dev stage which refers to the three sudomains.
If I go inside prod I get www tmp log.
My task would be to copy the remote www directory to my local machine. However I'm not able to.
My idea was after ssh connection to scp user@login.microsites.companyname.com:/prod/www /Desktop which should copy the files to my local Desktop.
However what it does is copying the files to the remote machine creating a directory "Desktop" which has the copied files.
ssh scp
I need help with this one please. I couldn't connect with any FTP client to a remote server given by a client. It would be SFTP protocol, but I could never connect.
With ssh user@login.microsites.companyname.com I'm able to connect.
After connecting I can use ls to list the directories and I get prod dev stage which refers to the three sudomains.
If I go inside prod I get www tmp log.
My task would be to copy the remote www directory to my local machine. However I'm not able to.
My idea was after ssh connection to scp user@login.microsites.companyname.com:/prod/www /Desktop which should copy the files to my local Desktop.
However what it does is copying the files to the remote machine creating a directory "Desktop" which has the copied files.
ssh scp
ssh scp
asked 2 days ago
MattMatt
11516
11516
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You seem to have gotten things muddled up. You are already on your remote server, so the /Desktop refers to /Desktop on the remote server, not your local machine, essentially you're taking a long way round there and copying the file locally to a different path on the server. Instead, you either need to change the command or change where you are running it from.
Option 1. From the server after sshing in:
scp -r /path/to/your/folder user@yourlocalmachine:/Desktop
Option 2. From your local machine (easier)
scp -r user@login.microsites.companyname.com:/prod/www /Desktop
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I getscp: /prod/www: No such file or directory
– Matt
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
thanks so muchthat did it for me
– Matt
yesterday
add a comment |
Your need to run your scp command on your computer, not the remote one. Or you have to qualify the destination Desktop with the appropriate user name and address.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961056%2fssh-scp-command-copies-files-from-remote-to-remote-but-not-to-local-machine%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You seem to have gotten things muddled up. You are already on your remote server, so the /Desktop refers to /Desktop on the remote server, not your local machine, essentially you're taking a long way round there and copying the file locally to a different path on the server. Instead, you either need to change the command or change where you are running it from.
Option 1. From the server after sshing in:
scp -r /path/to/your/folder user@yourlocalmachine:/Desktop
Option 2. From your local machine (easier)
scp -r user@login.microsites.companyname.com:/prod/www /Desktop
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I getscp: /prod/www: No such file or directory
– Matt
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
thanks so muchthat did it for me
– Matt
yesterday
add a comment |
You seem to have gotten things muddled up. You are already on your remote server, so the /Desktop refers to /Desktop on the remote server, not your local machine, essentially you're taking a long way round there and copying the file locally to a different path on the server. Instead, you either need to change the command or change where you are running it from.
Option 1. From the server after sshing in:
scp -r /path/to/your/folder user@yourlocalmachine:/Desktop
Option 2. From your local machine (easier)
scp -r user@login.microsites.companyname.com:/prod/www /Desktop
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I getscp: /prod/www: No such file or directory
– Matt
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
thanks so muchthat did it for me
– Matt
yesterday
add a comment |
You seem to have gotten things muddled up. You are already on your remote server, so the /Desktop refers to /Desktop on the remote server, not your local machine, essentially you're taking a long way round there and copying the file locally to a different path on the server. Instead, you either need to change the command or change where you are running it from.
Option 1. From the server after sshing in:
scp -r /path/to/your/folder user@yourlocalmachine:/Desktop
Option 2. From your local machine (easier)
scp -r user@login.microsites.companyname.com:/prod/www /Desktop
You seem to have gotten things muddled up. You are already on your remote server, so the /Desktop refers to /Desktop on the remote server, not your local machine, essentially you're taking a long way round there and copying the file locally to a different path on the server. Instead, you either need to change the command or change where you are running it from.
Option 1. From the server after sshing in:
scp -r /path/to/your/folder user@yourlocalmachine:/Desktop
Option 2. From your local machine (easier)
scp -r user@login.microsites.companyname.com:/prod/www /Desktop
edited yesterday
answered 2 days ago
SolarflareSolarflare
363
363
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I getscp: /prod/www: No such file or directory
– Matt
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
thanks so muchthat did it for me
– Matt
yesterday
add a comment |
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I getscp: /prod/www: No such file or directory
– Matt
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
thanks so muchthat did it for me
– Matt
yesterday
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I get
scp: /prod/www: No such file or directory– Matt
yesterday
Hey, thanks. If I use option 2 though … it asks me for the password, when entering I get
scp: /prod/www: No such file or directory– Matt
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Ah yes, sorry I hadn't realised you wanted the whole folder. You'd need to use -r (Recursively copy entire directories). I've updated my answer to add this in.
– Solarflare
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Thanks, I already tried that, but no luck either: See imgur.com/FGyiXGr Maybe this has todo with the fact that I couldn't connect with sftp either?
– Matt
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
Is there actually a /prod/www directory? You need to put the full path from root, so if prod is actually under /var/ for example, then you would need to change it to /var/prod/www. Go to the folder and run pwd to make sure you have the full path to the folder and you're not missing anything.
– Solarflare
yesterday
thanks so muchthat did it for me
– Matt
yesterday
thanks so muchthat did it for me
– Matt
yesterday
add a comment |
Your need to run your scp command on your computer, not the remote one. Or you have to qualify the destination Desktop with the appropriate user name and address.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your need to run your scp command on your computer, not the remote one. Or you have to qualify the destination Desktop with the appropriate user name and address.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your need to run your scp command on your computer, not the remote one. Or you have to qualify the destination Desktop with the appropriate user name and address.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Your need to run your scp command on your computer, not the remote one. Or you have to qualify the destination Desktop with the appropriate user name and address.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 2 days ago
lorisloris
12
12
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
loris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- 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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f961056%2fssh-scp-command-copies-files-from-remote-to-remote-but-not-to-local-machine%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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