ssh

Technical Notes

These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category.

How to create a password-less ssh login

How to create a password-less ssh login
based on: http://arctic.org/~dean/rdiff-backup/unattended.html

#log in as the user
host=server.com
hostnick=server
luser=localusername
suser=serverusername
#
mkdir -p .ssh
ssh-keygen -t rsa -f .ssh/id_rsa_$hostnick #generate key
############# You will be prompted for a password, press enter for no pw
#
#create .ssh/config file:
echo "host $hostnick" >> .ssh/config
echo "    hostname $host" >> .ssh/config
echo "    user $suser" >> .ssh/config
echo "    identityfile /home/$luser/.ssh/id_rsa_$hostnick" >> .ssh/config

browsing through an ssh proxy

Set up the proxy:
ssh -ND 8989 user@myproxysite.com
(will prompt for password and appear to hang)
use ctrl-C to break connection

Go to firefox preferences/advanced/connection-settings
o Manual proxy
o SOCKS host: localhost port: 8989
o SOCKSv5
no proxy for: localhost, 127.0.0.1

Browse to site:http://www.itistimed.com to verify your location

fuse filesystem with SSH

#install fuse on Ubuntu:
apt-get install sshfs

#install fuse on CentOS
# to install rpmforge, see: http://wiki.centos.org/AdditionalResources/Repositories/RPMForge
# see also: http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14292

yum install kernel-devel
yum install --enablerepo=rpmforge fuse dkms dkms-fuse

#make a directory and mount a remote file system on it
mkdir /music
sshfs -o allow_other root@sv.isnew.org:/backups/music /music

#unmount system
fusermount -u /music

#information taken from: http://www.linuxjournal.com/article/8904

SSH/SCP without a password

scp syntax


scp -P 1234 root@isnewer.org:/home/andrew/filename .

This is a useful link to putty configuration: http://dag.wieers.com/blog/improving-putty-settings-on-windows

Syndicate content