-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
one setup file for all packages ... -Minesh
- Loading branch information
pycon
authored and
pycon
committed
Feb 2, 2013
1 parent
3fe43df
commit fddeb54
Showing
4 changed files
with
120 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#other projects | ||
usr | ||
|
||
.ropeproject | ||
|
||
*.py[cod] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/sh | ||
|
||
( | ||
/usr/bin/expect --<<EOF | ||
spawn ssh localhost pwd; | ||
expect { | ||
"Are you sure you want to continue connecting (yes/no)? " { | ||
puts "About to generate key ..."; | ||
} | ||
"localhost's password: " { | ||
puts "About to generate key ..."; | ||
} | ||
eof { | ||
exit 0; | ||
} | ||
} | ||
spawn ssh-keygen -t rsa; | ||
expect { | ||
"Enter file in which to save the key (/home/*/.ssh/id_rsa): " { | ||
send "\n" ; | ||
exp_continue; | ||
} | ||
"Enter passphrase (empty for no passphrase): " { | ||
send "\n" ; | ||
exp_continue; | ||
} | ||
"Enter same passphrase again: " { | ||
send "\n" ; | ||
exp_continue; | ||
} | ||
"Overwrite (y/n)? " { | ||
send "y\n" ; | ||
exp_continue; | ||
} | ||
eof { | ||
system ssh-add; | ||
system cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; | ||
} | ||
} | ||
system ls -la ~/.ssh; | ||
spawn ssh localhost pwd; | ||
expect { | ||
"Are you sure you want to continue connecting (yes/no)? " { | ||
send "yes\n" ; | ||
exp_continue; | ||
} | ||
eof { | ||
exit 0; | ||
} | ||
} | ||
exit 1; | ||
EOF | ||
) > /dev/null 2>&1; | ||
|
||
if [ $? != 0 ]; then | ||
echo "#"; | ||
echo "# Error: Seems like ssh requires password. Am quitting ..."; | ||
echo "#"; | ||
exit 1; | ||
fi; | ||
|
||
exit 0; |