User Tools

Site Tools


wiki:ssh_tips

install in both pc

 sudo apt-get install openssh-client
 sudo apt-get install openssh-server
 sudo /etc/init.d/ssh restart

Get the ip with ifconfig

scp of several files on remote server, parsing the pw in automatic.

 ls Smoothed_*.bil | xargs -n 1 -P 10 bash -c ' sshpass -p 'passward' scp $1  selv@123.16.125.12:/home/selv/dem   ' _ 
 
 

mount a remote server

 
 sshfs hostname: mountpoint
 eg
 sshfs  data_urban/ giuseppea@litoria.eeb.yale.edu:/mnt/data2/scratch/data_ur/
 
 # to specify the ownership of the folder 
 sudo sshfs  -o nonempty   -o allow_other  -o uid=1115  -o gid=1115    /home/samid/grassdb/  samid@turaco.eeb.yale.edu:/mnt/data2/scratch/sami/grassbdmount/
 
 # get the uid by id -u  and id -g 
 
 
 

create a ftp on a machine

 sudo apt-get install vsftpd
 mkdir /home/selv/ftp
 sudo usermod -d /home/selv/ftp ftp
 sudo /etc/init.d/vsftpd restart

rsync via ssh

 rsync  -v -e ssh    cloud/tif/cloud7.tif      ga254@bulldogj.wss.yale.edu:/lustre0/scratch/ga254/dem_bj/CLOUD/

create a mount point i the ram

 sudo mount -t tmpfs   -o size=50G tmpfs /tmp/tmp_ram
 # in case you need specific permision
 sudo chown -R   samid:samid /tmp/tmp_ram
wiki/ssh_tips.txt · Last modified: 2017/12/05 22:53 (external edit)