You can change the priority of a process by changing how "nice" it is to other antagonising processes.
just type
renice <priority> -p <pid>
where priority is from 0 to 19
just type
renice <priority> -p <pid>
where priority is from 0 to 19
In this guide, I will try to introduce 11 tips that can be useful for those having old computers with low RAM and want to speed up their system for better performance. These tips are workable under Ubuntu 12.04 or older and any other Ubuntu-based system (Linux Mint 13, for example). If you have more tips, you can mention them in the comment form given below.ssh protocol. It consists of two basic components, an openssh-clientand an openssh-server. SSH clients communicate with SSH servers over encrypted network connections.openssh-client software should already be installed by default on Ubuntu. If you want to be able to accept SSH connections as well as request them, you’ll need the server software as well. The easiest way to ensure you have both is simply to run:sudo apt-get install openssh-client openssh-server
ssh command:ssh remoteuser@remotebox
remoteuser is the username of the remote account you’re trying to access, andremotebox is the remote server’s hostname or IP address.openssh-server) has a user account named joebanks and that the IP address of that computer on your private LAN is192.168.0.12, you could login remotely to that account from your Linux/Mac laptop by typing:ssh joebanks@192.168.0.12
ifconfig on that machine. This will display the status of the active network interfaces, and the local IP address of that device will be listed after inet addr. It will most likely be in the form of 192.168.0.xx.cooldomain.com, your syntax might look like:ssh joebanks@cooldomain.com
The authenticity of host 'remotebox (192.168.0.12)' can't be established.
RSA key fingerprint is 53:b4:ad:c8:51:17:99:4b:c9:08:ac:c1:b6:05:71:9b.
Are you sure you want to continue connecting (yes/no)?
yes (the most common response), you’ll see the following:Warning: Permanently added 'remotebox' (RSA) to the list of known hosts.
remoteuser‘s password:remoteuser@remotebox's password:
remoteuser@remotebox:~$
exit, or use Ctrl-D.scp. To copy a single file from your local machine to the server, use the following syntax:scp file.txt remoteuser@remotebox:/directory
file.txt is the name of a file in the current directory of your local machine,remoteuser@remotebox is the username and hostname or IP address of the server (just like in the above ssh examples, and /directory is the directory path on the server where you want your file copied.file.txt to the /home/joebanks/docs directory on the server you logged into above, you’ll run the following command from a local terminal session:scp file.txt joebanks@192.168.0.12:/home/joebanks/docs
ssh in to the remote computer and then run thescp command. Secure copy opens the ssh tunnel on its own. Since secure copy uses the ssh protocol for a secure connection, whenever you run the scp command, you’ll be prompted for a password (or passphrase) if the ssh connection requires it.scp ~/docs/oldfile.txt joebanks@192.168.0.12:/home/joebanks/docs/newfile.txt
scp remoteuser@remotebox:file.txt /local/directory
remoteuser@remotebox is the username and hostname or IP address of the server,file.txt is a file in the /home/remoteuser directory, and /local/directory is the local directory path into which the file will be copied.scp joebanks@192.168.0.12:~/docs/newfile.txt /home/joe/downloads
-r switch, like so:scp -r /local/directory remoteuser@remotebox:/remote/directory
/local/directory is the path to the local directory you want copied, and/remote/directory is the remote directory into which you want the directory to be copied.scp -r remoteuser@remotebox:/remote/directory /local/directory
/remote/directory is the path to the remote directory you want copied, and/local/directory is the local directory into which you want the directory to be copied.joebanks@192.168.0.12 or whatever. It sure would be nice to type something shorter. Let’s fix that.~/.ssh/config, to simplify some of the tedious typing associated with logging into remote machines. To edit (or create) that file, we’ll use the nano text editor, but you can use vi, emacs, kate or whatever:nano ~/.ssh/config
Host volcano HostName 192.168.0.12
volcano with the HostName (or IP address) 192.168.0.12, so now to login you’ll only need to type:ssh joebanks@volcano
Host BigWoo HostName 192.168.0.12 User joebanks
ssh BigWoo
scp examples:scp file.txt BigWoo:
man ssh_config.remoteuser‘s password on each login attempt, SSH will initiate a challenge-and-response protocol which attempts to match an encrypted public key (stored on the server) with a protected private key (stored on the local machine). This completely eliminates the need to send sensitive information (like a password) over the network, encrypted or not.ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (~/.ssh/id_dsa):
Enter. This selects the default location. Next you’ll see:Enter passphrase (empty for no passphrase):
Enter at this point, thereby selecting no passphrase. This can be appropriate in some instances (see below), but you should be aware that it is not as secure. While sshwill still use an encrypted public/private keypair (which is almost certainly more secure than typing the remote user’s password like you’ve been doing), anyone gaining access to your local account will thereby also gain unfettered access to any remote hosts which recognize your public key.Enter, you’ll see:Enter same passphrase again:
Your identification has been saved in ~/.ssh/id_dsa.
Your public key has been saved in ~/.ssh/id_dsa.pub.
The key fingerprint is:
42:ac:8a:81:31:81:e5:7b:d2:01:42:2d:64:32:0f:dd localuser@localbox
~/.ssh/id_dsa.pub to the remote machine, by running the following command from a local terminal session:ssh-copy-id -i ~/.ssh/id_dsa.pub remoteuser@remotebox
remoteuser‘s password one last time, and then you’ll see the message:Now try logging into the machine, with "ssh 'remoteuser@remotebox'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
ssh-copy-id method doesn’t work with your version of OpenSSH, try the following command:cat ~/.ssh/id_dsa.pub | ssh remoteuser@remotebox 'cat >> .ssh/authorized_keys'~/.ssh directory doesn’t yet exist on the remote machine, you can create the directory andcopy the public key all in one swell foop, like so:cat ~/.ssh/id_dsa.pub | ssh remoteuser@remotebox 'mkdir .ssh; cat >> .ssh/authorized_keys'~/.ssh/authorized_keys file on the remote machine contains your public key, you’ll be prompted for your passphrase at each login attempt, rather than the remoteuser‘s system password, like so:Enter passphrase for key '~/.ssh/id_dsa':
~/.ssh directory and the~/.ssh/id_dsa file on your local machine, to disable any outside access to your private key.chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_dsa
ssh and scp in shell scripts and cron jobs to automate repetitive tasks, such as remote backups of critical files. To do so, however, you’ll need to implement some sort of passwordless authentication scheme, so that scripts can run without human intervention.ssh command without requiring a password or passphrase, simply go through the steps outlined above for enabling public-key authentication, but instead of entering a passphrase when prompted, simply press Enter.ssh-keygen program will generate a public/private key pair for you that will allow password- and passphrase-less access to any remote server which has your public key stored in its authorized_keys file.remoteuser‘s password and sending it over the network. Sure it’s encrypted, but it could still be intercepted.ssh-agentand keychain daemons to store your passphrase between terminal sessions, so you don’t need to type it every time.