Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-stable
Commits
f927b10e
Commit
f927b10e
authored
Nov 29, 2000
by
Robert Ricci
Browse files
Added message to tell people what to do in case their ssh identity/authorized_keys
aren't set up correctly, and a few misc. cleanups.
parent
772851b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
security/plasticwrap
View file @
f927b10e
...
...
@@ -3,26 +3,22 @@
# Location of ssh program
$ssh
=
"
/usr/local/bin/ssh
";
# Location of ssh-add program
$add
=
"
/usr/local/bin/ssh-add
";
# Remote host to connect to
$host
=
"
p
lastic
.cs.utah.edu
";
$host
=
"
p
aper
.cs.utah.edu
";
# Make sure they're running ssh-agent
if
(
!
$ENV
{
SSH_AGENT_PID
})
{
print
"
You should be running ssh-agent - To start it, run:
\n
";
print
"
eval `/usr/local/bin/ssh-agent`
\n
";
print
"
It would be a good idea to add this to your ~/.login file
\n
";
}
# String to turn off password authentications
$nopass
=
"
-o 'BatchMode yes'
";
# FIXME: Maybe there's a better way to check for this?
if
(
!
`
$add
-l | grep -v "no identities"
`)
{
system
$add
;
}
# Turn off host key checking.... for now.
$nokeycheck
=
"
-o 'StrictHostKeyChecking No'
";
# Current working directory:
$cwd
=
$ENV
{
PWD
};
# Now, do the magic
print
"
$ssh
$host
/home/ricci/paperbag dir=
$cwd
$0
@ARGV
";
system
"
$ssh
$host
'/home/ricci/paperbag dir=
$cwd
$0
@ARGV
'
";
$rv
=
system
"
$ssh
$host
$nopass
$nokeycheck
dir=
$cwd
$0
@ARGV
";
if
(
$rv
>
256
)
{
print
"
SSH failed. You may need to run the following commands:
\n
";
print
"
mkdir
$ENV
{HOME}/.ssh
\n
";
print
"
ssh-keygen -P '' -f
$ENV
{HOME}/.ssh/identity
\n
";
print
"
cp
$ENV
{HOME}/.ssh/identity.pub
$ENV
{HOME}/.ssh/authorized_keys
\n
";
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment