Archive

Archive for May, 2008

Manually adding a line to the syslog

May 30th, 2008

echo “Test!” | logger

check the manual for “logger” for more information and switches:  (man logger)

admin Linux Tutorials

Send a message to another user on a linux box

May 9th, 2008
Comments Off

If you want to send a message to another user on the same server.  you can use the following:

echo “Hello” | wall

This message will be seen by everyone on the server

admin Linux Tutorials

Passwordless SSH (Using RSA Key)

May 9th, 2008
Comments Off
  • FROM YOUR LOCAL MACHINE:
    % ssh-keygen -t rsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (~/.ssh/id_dsa):
    HIT ENTER
    Enter passphrase (empty for no passphrase): LEAVE BLANK

    Enter same passphrase again:
    LEAVE BLANK
    Your identification has been saved in ~/.ssh/id_dsa
    Your public key has been saved in ~/.ssh/id_dsa.pub
  • ON THE SERVER YOU WANT TO CONNECT TO
    Copy and paste  ~/.ssh/id_dsa.pub file into the file ~/.ssh/authorized_keys on the server you wish to connect to.  Make sure the string is on one line.

admin Linux Tutorials

Copying Files To Remote Destination using SCP

May 8th, 2008
Comments Off

How to copy a local folder and its contents to a remote location over ssh on a non-standard port (222)

scp -r -P222 mylocalfolder/ jsmith@remotedesitination:/home/jsmith/remote folder

admin Linux Tutorials

SVN over SSH

May 8th, 2008
Comments Off

Instructions for running Subversion (svn) over SSH on a non-standard port

Server Side Config
Just start “svnserve”  using the following command. Change the values to reflect your environment
#svnserve –listen-port 225 -d -r /srv/svn

Client Side Config
This is pretty easy too,  just edit: ~/.subversion/config and add the following line below the header [Tunnels]
myRemoteSVNServer = /usr/bin/ssh -p 222 -l jsmith

  • 222 is the SSH port on the server, not the one you setup for svn to run on (225)
  • jsmith is a user authorized to use ssh
  • /usr/bin/ssh is the full path to “ssh”

Accessing SVN
The command is the same except for the additional “svn+[YOURTUNNELNAME]”

IE:    svn co svn+myRemoteSVNServer://192.168.0.40/srv/svn/

admin Linux Tutorials