Jump to content

SCP with password in same line


  • Please log in to reply
4 replies to this topic

#1
truehybridx

truehybridx

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 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

#2
MacUser2525

MacUser2525

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,335 posts
  • Gender:Male
  • Location:Canada

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...lient=firefox-a

#3
truehybridx

truehybridx

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts

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...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

#4
MacUser2525

MacUser2525

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,335 posts
  • Gender:Male
  • Location:Canada

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.

#5
truehybridx

truehybridx

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts

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!!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy