Posts tagged ssh
How to download recursive folders in linux with command line ftp
Nov 10th
Ok so all you want to is to ssh into your server and pull a stack of files over from another PC via ftp. Sounds simple does it now. This is linux we are talking about.. nothing is simple.
The short answer.. sod ftp use wget like
[bash]wget -r ftp://user: pass@domain/folder/*[/bash]
Long answer
And being linux all the help is just as cryptic as the manual.
So you probably tried to ftp in to the remote PC and use get to get the files… ha you hapless fool. Then you googled a bit and found that mget command gets more then 1 file so you tried
mget *
you then get sick of answering YES to every prompt.
the someone points out that if you enter
ftp> prompt
it will toggle out of prompt mode
then you realise that this is only downloading files anyway.
argghhh
eventually you google for “lunux ftp recursive” and finally you have cracked it.
How to extract *.tgz or *.tar.gz
Jul 18th
To extract .tar.gz or .tgz files from terminal or via ssh
tar -zxvf file.tar.gz
or
tar -zxvf filename.tgz
I don’t know about anyone else but 99% of the time when faced with a compressed tar file I want to extract it to its own folder and view the progress of the decompression. So why it is that every time you seek the answer to this question do most linux support sites feel the need to explain over 1500 words every single possible switch and variant of the tar command coupled with the historical development and legacy options of the command. WE DON’T CARE.
SSH as a different user on remote linux box
Jul 18th
Scenario:
You are sat at a linux box (ubuntu, fedora, suse etc) and want to ssh into another linux box (probably your webserver). By default typing ssh remote-domain.com will attempt to log you in as the user you are currently logged in as. However, you may want to log into the remote machine as someone else.
Short answer:
in a linux terminal enter
ssh user@remote.com
Long answer:
More >