I am programming a litte “chatroom” for linux users. The system is very easy. The user opens an ssh-connection and then starts a “reader.sh” script which is just an tail -f command running and he openes in another ssh-connection a “writer.sh” script which just writes in the same file. (echo “hi” >> example)
The problem is that if the user starts my script, hes asked 2 times for the password. I want to disable that and wrote this script:
IP=10.42.0.1 PASSWD=123456 USERN=chatter ssh-keygen -t -f/home/$USERN/.ssh/id_rsa -P$PASSWD rsa ssh $USER@$IP mkdir -p .ssh cat .ssh/id_rsa.pub | ssh $USER@$IP 'cat >> .ssh/authorized_keys' gnome-terminal -e "ssh $USER@$IP writer" gnome-terminal -e "ssh $USER@$IP reader" exit
(the important part:)
ssh-keygen -t -f/home/$USERN/.ssh/id_rsa -P$PASSWD rsa
But if I run this “install.sh” script I get this error:
Too many arguments.
What did I do wrong? Can somebody help me?