@echo off
rem IMS kasutajanimi ja salasõna
set /P user=Sisesta kasutajanimi: 
set /P pass=Sisesta salasona: 
:KEYS
cd c:\rsync\
mkdir .ssh
set to=ims.ut.ee:/home/%user%/.ssh/authorized_keys
echo ==========================================================
echo KUI VÕTI ON OLEMAS SIIS VALI NO
echo ==========================================================
ssh-keygen -P "" -t dsa -f /cygdrive/c/rsync/.ssh/authorized_keys
pscp -l %user% -pw %pass% "c:\rsync\.ssh\authorized_keys.pub" %to%
ssh -i  /cygdrive/c/rsync/.ssh/authorized_keys %user%@ims.ut.ee "chmod -R 700 .ssh/; echo tere"
pause