Running a Program on a Remote Server Using SSH

Written by C.S. Deam

Continued from page 1

Now we'll telnet into Cash and concatenaterepparttar file into /home/named/.ssh/authorized_keys file.

Cash$> pwd /home/named/.ssh Cash$> cat >> authorized_keys Cash$> exit Connection closed. Johnny$>

Let's recap what we've done so far. 1) We've created public and private keys on Johnny. 2) We've ftp'drepparttar 107773 public key file,, from Johnny to Cash. 3) We've telnetted to Cash, and concatenatedrepparttar 107774 contents of into authorized_keys

We're now ready to manually login from Johnny to Cash using ssh.

Johnny$> ssh -i /home/boy/.ssh/sue named@Cash The authenticity of host 'Cash (' can't be established. RSA key fingerprint is 65:11:7d:ef:ed:a3:cc:34:d1:b5:ba:c9:16:22:31:23. Are you sure you want to continue connecting (yes/no)? yes ================================================================


================================================================ Cash$>exit Connection to Cash closed. Johnny$>

Now on Johnny, create a shell script called '' withrepparttar 107775 following one line of contents and chmodrepparttar 107776 script to 777.

ssh -i /home/boy/.ssh/sue named@Cash /usr/bin/ls -l

Next, executerepparttar 107777 script on Johnny.

Johnny$> ================================================================


================================================================ -rwxrwxr-x 1 named namedgrp 10020 Oct 17 14:35 namedfile1.txt -rw-r--r-- 1 named namedgrp 680 Aug 14 16:18 namedfile.html -rw------- 1 named namedgrp 1148 Aug 18 09:51 mbox drwxr-xr-x 2 named namedgrp 512 Jun 17 13:38 old Johnny$>

You just executed a program on Johnny, that logged into Cash and ran a program (unix 'ls -l').

The next step you'll want to take is to replacerepparttar 107778 '/usr/bin/ls -l' command inrepparttar 107779 program withrepparttar 107780 path and name ofrepparttar 107781 program that you want to run.

C.S. Deam is the "mind behind",,, and Visit his sites and see what kind of goodies he's giving away this week.

How To Keep Your Computer Virus Free

Written by Otis F. Cooper

Continued from page 1

What should you do to prevent virus infection if you don't have anti virus software installed on your PC? We should all give a word of thanks forrepparttar Internet. Rush over to onerepparttar 107772 free virus scanning services which will scan your hard drive for malicious codes.

Trend Micro's Housecall scans your drive for viruses, trojans and worms.They ask you to register first but you can scan without registering.Why not go over to where you can go Visit Symantec's Security Check site and download their scan for viruses software which check your PC for possible infections of any malicious codes.Go to

Don't do it.Don't say,yes,I will get anti virus protection soon.It will be when you wait one day too many and realize your computer must have a virus because it is deleting files,randomly showing graphics,performing one task when it should be performing another task, and other strange things.Takerepparttar 107773 time or investrepparttar 107774 money for virus protection right now.

Otis F. Cooper is solely dedicated to boosting the knowledge and confidence of every computer user that is serious about knowing computers.Use his informative articles and videos to understand every aspect about the PC. Read more about his formula for pc training at and subscribe to the only newsletter with video clips showing you step by step PC repair procedures.

    <Back to Page 1 © 2005
Terms of Use