Checking the disk usage of different linux servers using df -h linux command
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Checking the disk usage of different linux servers using df -h linux command
Anybody knows how to Check the disk usage of different linux servers using df -h linux command. My host server is 66.50.100.1, I can check its disk usage by using df -h command. I got my disk usage. Now using my host server Im going to check the server 66.50.100.3 disk usage. Is its possible to check the disk usage of 66.50.100.3 using my host server?. Please advice... Thanks..
Last edited by jhunex909; 01-07-2010 at 06:09 AM.
Reason: no tags
Create an ssh rsa key, with no passphrase, on the remote host(s).
Then from your server, ssh into that server using the private identity file and throw a single command:
Thanks zQUEz and Kirukan.. I think ssh accountname@66.50.100.3 "df -h" is the one good answer to my problem. Create an ssh rsa key, with no passphrase, on the remote host(s) How can I do this one?.
assume server=66.50.100.1, remotesvr=66.50.100.3
On remotesvr, run `ssh-keygen` and follow the prompts to create an rsa-id. When asked for a passphrase, just press enter as you don't want a passphrase. You should end up with 2 files. One will be "something.pub" and the other maybe id-rsa or whatever you told it to call it. The .pub file will be 1 long line (might break across rows) and is the public key.
Still on remotesvr, (and ssh-keygen may have done this for you, i can't remember),
`mkdir ~/.ssh~
`chmod 700 ~/.ssh`
copy the .pub file above, and rename it to "~/.ssh/authorized_keys2".
`chmod 600 ~/.ssh/authorized_keys2`.
Copy the rsa-id file to server and call whatever you like. You should keep this file secure.
On server, ssh into remotesvr using the command: `ssh -i rsa-id usera@remotesvr` - the first time you will have to confirm the remote ID. This is a one time thing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.