Hi All!
I'm writing Finder plug-in with Automator (it invokes shell script listed below), which will get archives from remote host and unpack them to the current directory.
But ssh will prompt for password! For some reasons, authentification without password is impossible.
#!/bin/bash
USERNAME="Ubivetz"
HOST=Ubivetz@top_secret
echo "Move all files and folders from $USERNAME/topka directory at developers' machine to $(pwd) and unpack them"
scp $HOST:$USERNAME/topka/* . && \ # get files
for i in $(ls *.7z); do 7za x $i; rm -f $i; done # unpack them and remove arhives
if [ $? -eq 0 ]; then # if everything is fine, remove arhives at the remote host
ssh $HOST "cd $USERNAME/topka && rm -f *.7z"
fi
I'm writing Finder plug-in with Automator (it invokes shell script listed below), which will get archives from remote host and unpack them to the current directory.
But ssh will prompt for password! For some reasons, authentification without password is impossible.
#!/bin/bash
USERNAME="Ubivetz"
HOST=Ubivetz@top_secret
echo "Move all files and folders from $USERNAME/topka directory at developers' machine to $(pwd) and unpack them"
scp $HOST:$USERNAME/topka/* . && \ # get files
for i in $(ls *.7z); do 7za x $i; rm -f $i; done # unpack them and remove arhives
if [ $? -eq 0 ]; then # if everything is fine, remove arhives at the remote host
ssh $HOST "cd $USERNAME/topka && rm -f *.7z"
fi