Friday, February 22, 2013

How to save file to desktop using Linux commands.?

Q. I am a beginner to Linux commands. I use SSH to connect to a Linux server. What command can I use to save a text file on the server to my desktop? Example?

A. From your desktop, fire up a terminal, or use Cygwin if you're under Windows (make sure you have installed the openssh packages) :

scp <your_user_name>@<server_name>:<path to remote file> <path to local dir/file>

Enter your password, and you're done :)

How hard is it to run a secure Linux server, with Apache, PHP, MySQL, and mail services?
Q. I will be getting my own dedicated server soon and while I have a functional knowledge of the concepts of Linux, I don't know everything. Will my server be reasonably secure if I am sure to keep everything updated and patched (assume there are no PHP scripts vulnerable to SQL injection etc.)

A. Make sure you have strong passwords for everything. This includes your database. Use SSH to connect, scp or some other secure program to transfer files (not vanilla FTP, since it transmits passwords in the clear).
If your database doesn't need to talk to other hosts, configure it so it only listens on the loopback interface.
Be careful when configuring your mail server, so it isn't an open relay.
Get a cert for the web server, so you can use SSL to protect information that gets sent over the net.

The biggest potential source of vulnerabilities will be from whatever web apps you install. Subscribe to the announcement/security mailing list(s) for those apps (and for the Linux distro you use), so you don't get blindsided. Before you install something, you might want to check out a security site (like Secunia) and search to see what advisories have been issued for that software w/in the recent past. This will give you an idea about just how worried you should be about potential issues down the road (and what current issues there are that haven't been fixed, yet).

If you're rolling your own web apps, there are a whole bunch of things to watch out for, especially if you're doing things with user data (file uploads, SQL searches, form processing, etc).

How do I upload a folder recursively via SSH through a linux terminal?
Q. The problem is quite simple actually. I have a folder in my desktop which I want to be able to upload to my server via SSH. I want to be able to do that using only the linux terminal. Thanks
I don't know about import/export functions. I just want to upload via SSH. I know it's possible, I just don't know how.

A. See the SCP command (syntax in source link). It copies files over ssh. As you can see, it has an option to put an entire folder over at once.

Alternatively, there's SFTP (secure-ftp) which tunnels a ftp connection through ssh (valid only if the target server also has ftp service in addition to ssh).



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment