Jump to content
InsanelyMac Forum
truehybridx

SCP with password in same line

Recommended Posts

hey im making an autoinstall gui thing that uses scp to put things on my iphone and i was trying to figure out how i would provide the password to the iphone in the same line so it doesnt ask for the password and mess things up lol

 

ie: scp -r "myStuff" root@0.0.0.0:/Applications/ "password"

 

i tried using

root:alpine@0.0.0.0

but i get ssh: Could not resolve hostname root: nodename nor servname provided, or not known

lost connection

 

Also i realize that this may be a security risk in some people's eyes but i dont mind bcuz theres no other malusers on my network besides me

Share this post


Link to post
Share on other sites
Advertisement
hey im making an autoinstall gui thing that uses scp to put things on my iphone and i was trying to figure out how i would provide the password to the iphone in the same line so it doesnt ask for the password and mess things up lol

 

ie: scp -r "myStuff" root@0.0.0.0:/Applications/ "password"

 

i tried using

root:alpine@0.0.0.0

but i get ssh: Could not resolve hostname root: nodename nor servname provided, or not known

lost connection

 

Also i realize that this may be a security risk in some people's eyes but i dont mind bcuz theres no other malusers on my network besides me

 

No need for the password if you use key authentication there would be no security risk as you control both devices and your generated keys.

 

http://www.google.ca/search?q=ssh+no+passw...lient=firefox-a

Share this post


Link to post
Share on other sites
No need for the password if you use key authentication there would be no security risk as you control both devices and your generated keys.

 

http://www.google.ca/search?q=ssh+no+passw...lient=firefox-a

 

 

ok if i go that direction would i be able to write a script that makes the keys on the local system and then uploads them to the iphone? I'm trying to make this GUI easy to setup on new systems

Share this post


Link to post
Share on other sites
ok if i go that direction would i be able to write a script that makes the keys on the local system and then uploads them to the iphone? I'm trying to make this GUI easy to setup on new systems

 

Can't see why not all you would need to do is run the ssh keygen if necessary on the local host/machine then scp the key to the iPhone, now on the first run obviously needing to enter the password to get the key on the phone after that it should be without the password.

Share this post


Link to post
Share on other sites
Can't see why not all you would need to do is run the ssh keygen if necessary on the local host/machine then scp the key to the iPhone, now on the first run obviously needing to enter the password to get the key on the phone after that it should be without the password.

 

 

ok ill give that a try and see if i can make it work for what i need, unless im able to find an easier way

Thanks!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.



×