Every new hosting plan ordered during APR2019 can request free DNSSEC setup ($39 value). Use coupon APR2019 for free DNSSEC ($39 value).
Dominate local SEO with a regional SlickStack cloud server for just $39/month! Order Now
250,000+ sites use our plugins! Become A Member

How To Connect Via SFTP Within An SSH Client

Jesse Nickles   |  15 Oct, 2016

Perhaps one of the least known tricks in migrating a website or a bunch of files to a new server is the ability to connect to a remote server via SFTP while inside of an active SSH session. The reason this is so handy is because many times a customer doesn’t have SSH access to another server, and also using alternative migration methods such as manually downloading/uploading or using a WordPress migration plugin is out of the question (large files, etc).

First, make sure you are inside an active SSH session on the “new” server that is pulling files. Then:

sudo sftp -P 2222 [email protected]

After establishing a connection for the first time, you will see the typical warning message that encrypted SSH/SFTP connctions always spit out, and simply type “yes” at the prompt and hit ENTER:

The authenticity of host '123.123.123.123 (123.123.123.123)'
can't be established. ECDSA key fingerpring is
12:34:45:1a:aa:12:33:4c:87:65:43:21:bb:3c:fa:c0. Are you sure you want
to continue connecting (yes/no)?

After you’ve successfully connected, there is the issue of browsing the remote server’s directories and just “getting around” the server itself. Thankfully, some of the basic SFTP commands are exactly the same as SSH commands, such as “list directory” or “change to directory” or “change to parent directory” as follows:

ls
cd /directory
cd ..

But things quickly get a bit goofy after that. Common SSH (shell) commands such as WGET, TAR, MV, etc simply will not work while browsing a remote server over SFTP. And since we have no benefit of a UI client such as FileZilla, knowing some SFTP commands is an absolute must.

Usually the best option is first change into the “destination” directory on the “new” server, such as /wp-content/ and then via the SFTP command known as get we can recursively pull over an entire directory full of files:

get -r uploads

After hitting this command you will see verbose list of each file coming across. When its finished, the SFTP prompt will return to normal, at which point you can exit but typing “exit” and ENTER.

More info:

https://www.digitalocean.com/community/tutorials/how-to-use-sftp-to-securely-transfer-files-with-a-remote-server

Tags: , , , ,

Last modified: 15 Oct, 2016https://www.littlebizzy.com/?p=8141

Results For Local Business, High Traffic, And E-Commerce.

Local Business

"After being hosted on GoDaddy for years, I didn't realize how negatively it was impacting my search traffic. Soon after moving to LittleBizzy, my homepage went from page 3 on Google to #1 world-wide for my target market, and I also reached the top 3 on Google Maps, with no additional SEO work."

Juliette S.

High Traffic

"Before moving to LittleBizzy, whenever our news website was featured on the Drudge Report, it often slowed to a crawl or even froze up during big traffic spikes. Now, that never happens anymore, and we've been able to focus on publishing more articles instead of worrying about our web hosting."

Tony H.

E-Commerce

"The research by Amazon is definitely true, because our slow WooCommerce store was bleeding sales. After LittleBizzy stabilized our performance and moved us closer to our target customers, we saw a measurable improvement in shopping cart checkouts, esp. during holidays... much better!"

Mohammed H.

No contracts, free migration, and free SSL forever. What are you waiting for? Order Hosting Now.

WordPress Gossip, Technical SEO News, And Other Goodies.

Free. Unsubscribe anytime.

Brands That Trust Our Software: