How to download files through active ssh session in Coursera Lab? - shell

Sometimes you need to archive and download your exercise code from Qwiklabs in Coursera.
What is the easy and best way to do this using shell command in Linux?

I solved this issue using following utilizing scp command.
suppose that you want to connect to the user#ip given by the https://googlecoursera.qwiklabs.com/.
General syntax:
you#local_machine:scp -i *.pem user#ip:/dir/file.zip ./current_directory
*.pem file would be available in https://googlecoursera.qwiklabs.com/ for download after starting your Lab.
Please share your proposed solution as well.

Related

Transfer file in Secure Shell

I use Secure Shell as a Chrome extension (https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo?hl=da)
Now I have finished some programming and I need the file on my computer.
How can I transfer the file to my computer? Can I send it by email or something?
I have tried yanking all the lines in vim, but I still don't get it copied to my windows clipboard.
One entertaining (and moderately ridiculous) approach would be sprunge.
Run this on the remote machine:
cat myFile | curl -F 'sprunge=<-' http://sprunge.us
And then visit the URL it prints on your local machine. :D
I presume that you are using Windows OS and trying to download your file from a Linux like OS.
You use MobaXterm and it comes with a file transfer features.
http://mobaxterm.mobatek.net
On a CLI you can use "scp" to download and upload.
Another one is you can also use FileZilla using SFTP protocol

Copy files from authenticated windows server to Unix server

I have a set of zip files that need to be copied from an authenticated windows server to a unix server which is authenticated too.
I have tried using Pentaho but have not found any success. Is there any other alternative way with which this copy can be done like using scripts or any such method?
Thanks in advance.
Assuming your server supports ssh..
Putty comes with a utility called pscp which works the same as scp.
To copy a file you would typically do this:
pscp myfile.zip me#myserver:/my_directory/.
There is also winscp if you want something more GUI.
Use scp command. For more detail visit http://www.garron.me/en/linux/scp-linux-mac-command-windows-copy-files-over-ssh.html

Windows Command Line FTP to deploy website

Trying to set up a post build script on my CI server to push changes to our web server by FTP. In as few lines as possible how can i push a folder of files to my webserver using windows FTP? For example deployment folder is:
c:\deployment\*.*
How can i recursively push all files to replace on the web server?
I'm open to using cmd or powershell - MS Windows only
Thanks
Windows' built-in command-line FTP client doesn't have recursion built-in. The easiest way would be to use a different FTP client. NcFTP will do what you're looking for. See the manual page for ncftpput. The syntax is basically as follows:
cd c:\deployment
ncftpput -u user -p pass -R ftp.ftpserver.com /path/on/ftp/server .\*
Or if your web server also runs an ssh service, then rsync would be even better.
Fsync is good, I am using it for long. It allows to push only what has changed. Recursion of course. Exclude files, too. Track client-side (much faster) what has changed... Biggest only drawback: No SFTP./ProductList/Fsync.html

ssh-keygen without ssh access

I've got a Lacie Network Space 2 where they have disabled the SSH access and I'd like to write a script where I transfer files from my computer to the NS2 using scp.
The only problem I have is that I can't (from what I know) generate a public key without first connecting via SSH.
So my question is: Is it possible to generate a key without having access to SSH, for use with scp? Or some other clever way to transfer files to my NS2 (FW 2.2.4) using a script.
I might add that I'm currently mounting the disk and using cp, but I'd like something better.
Thanks in advance!
What exactly do you want? If you want to scp to the NS2, you'll have to generate the keys on the source machines and append it to authorized_keys on the target. Since you can already mount & use cp, you should be able to do that.
Note that since scp works over ssh, if they've disabled ssh this won't work. OTOH, if they've only disabled password based ssh, or set /bin/false as your shell, this might work.
I have concluded that if you want to gain access to ssh keys on your NS2 with a newer FW you have to remove the disk from its casing and connect it to a computer, as they explain in this link
Enabling SSH on NS2
I thank you both for your answers, but I guess I'll have to do it the hard way.

UI client for command line ssh remote server manager

I learning to use the command line for remote server operation, since the usual ftp/sftp client are terribly slower the unix commands via ssh. But of course is not very practical if you're not an expert.
My question is: does it exist a app (or a webapp) that gives a UI to unix ssh remote commands? something that when for example I copy a file between two folder will use the cp command (wishfully giving you the options).
thanks
PS: I use Mac
Not exactly a GUI for the shell, but nice for filesystem operations: MacFuse. Here is a short introduction into sshfs and MacFuse:
http://zanshin.net/2009/11/06/using-sshfs-macfuse-and-macfusion-to-access-remote-filesystems/

Resources