How to copy folders from remote computer without using powershell or commandprompt - remote-access

Is it possible copy folders from remote computer without using powershell or cmd. Is there any other interface?

Related

unable to copy file from local machine to ec2 instance in ansible playbook

So I am running scp -i ~/Downloads/ansible-benchmark.pem ~/Documents/cis-playbook/section-1.yaml ubuntu#ec2-18-170-77-90.eu-west-2.compute.amazonaws.com:~/etc/ansible/playbooks/
to transfer an ansible playbook I created with VSCODE the section-1.yaml file,
but I am coming up with an error scp: /home/ubuntu/etc/ansible/playbooks/: No such file or directory
the directory definitely exists in the ec2 instance, I did install ansible, but for some reason I don't know why it isn't recognising the directory.
For the first one, you can check if is available
/home/ubuntu/etc/ansible/playbooks/
if that part is not available on target/source, you can use create a folder on ansible first then you can go for copy on target
You can use this issue Ansible: find file and loop over paths

How can I create symlink on Windows to remote Linux folder using SSH?

I want to create a link to remote Linux folder from Windows 10 machine. I see Windows has SFTP and SCP commands built in for accessing remote machines. So there must be some way to create links as well.
I wonder if we can we do something like below? (forgive the syntax)
mklink /D c:\remotelinks\remoteDir ssh:user#host//linuxdir
A straight link like you mention maybe not, but you have some options:
https://github.com/billziss-gh/winfsp/releases/tag/v1.2POST1
https://medium.com/#danielmarinomirallestaset/mounting-linux-fs-in-windows-10-using-sshfs-e29c7ca81c87
http://makerlab.cs.hku.hk/index.php/en/mapping-network-drive-over-ssh-in-windows
After setting up something like you might be able to create links or shortcuts.

Can not copy files From Azure VM to local Windows

I want to copy file from Azure Linux VM to local Windows PC. Actually I remember, I could do this perfectly with the same command but now when I run the cmd it shows message as 100% done but when I go to tmp directory, I dont see the file there.
Here is the cmd I give on Linux VM:
scp -r mlopenedx#138.91.116.170:/edx/var/log/tracking/tracking.log /tmp/
And this is output I get:
tracking.log 100% 70KB 70.0KB/s 00:00
But when I see tmp folder I dont see the file.Can any on suggest me the answer.
I have tried things like: giving Home folder ~/ instead of /tmp/.
Also tried below cmd:
sudo scp -i ~/.ssh/id_rsa mlopenedx#MillionEdx:/edx/var/log/tracking/tracking.log /tmp/
The easiest way to do this is to run pscp from windows like this:
pscp mlopenedx#LINUXVMIP:/edx/var/log/tracking/tracking.log c:/someExistingFolder/tracking.log
to have pscp command you need to install PuTTY.
your command looks wrong as one of the paths needs to be Windows valid path C:/Folder/Folder/File.ext. If you are executing that command from Linux VM and 138.91.116.170 is your Linux vm IP address than you are copping files locally - you can try finding your log file on that linux in \tmp\ folder. In order for that to work from remote Linux to local Windows you would need public IP for your windows or some sort of tunnel that would allow this connection.
Also you are adding -r recursive copy and you are pointing to file.

Compare time-stamp of a remote file with a local file using Ant

I have an installer file on my remote machine with Installer-000.zip name and i want to copy that file into my local machine(linux-CentOS) under /media/Data/Installer/ directory using ant ftp task.
I am able to copy the installer from remote server to my machine if the installer is not already present in my machine but when i again run the build.xml it downloads the heavy installer file again on my local machine which makes the whole building time much longer.
so esentially i want to comapre the time-stamp of my installer(remote) with one on my local machine and copy from remote to local if the installer file present on remote machine has a newer time-stamp.
(Obviously I want an ant task to do this. I am using ant-version 1.9.6 )
any suggestion or comments would be appreciated !
Thanks in advance !
I don't think there is an ANT task that will calculate the checksum of a remote file. I suggest a different approach of using rsync over ssh.
Ant, download fileset from remote machine

How to download a file from ubuntu virtual machine using Azure powershell script

I have created an Ubuntu VM on Azure and I want to download a file stored in one of the directories of this VM.
I want to do this using Powershell.
If you just want to grab a couple files, then you can use pscp. You can download pscp from here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Usage:
pscp.exe -r -pw 'password' 'local-path' adminuser#hostname.cloudapp.net:/path
If you want to do this more than once from multiple clients you can just serve the files with a web server, e.g. Apache. Then you can just use Invoke-WebRequest to download the files via HTTP.
Virtual machines in azure are completely locked down.
Do you just need to download the file once?
I am trying to understand your requirement of using PowerShell.
Here are a few options:
1. manually ftp the file from ubuntu to a FTP server and download it from there.
2. second option for you is to use Azure command line tools that run on ubuntu.
you should install Azure CLI
https://github.com/Azure/azure-xplat-cli
There are instructions for Ubuntu distributions.
One Azure CLI has been isntalled you can use the azure storage command line options to tranfer the file to an azure storage container.
After the files in an azure container you can use PowerShell to download it.
You can also use Azcopy tool to down the file from the container.
https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/
Let me know if this meets your needs.

Resources