This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Cloning ubuntu 14 setup
#10
RE: Cloning ubuntu 14 setup
(01-31-2018, 05:48 AM)CMs222 Wrote: using this guide > https://devops.profitbricks.com/tutorial...n-windows/
Create New Public and Private Keys:
number 4. when saving private key, it prompted me to add a passphrase (should I ?) as its not mentioned in guide...
Copy Public Key to Server:
got to number 3. and when i went to safe got error
[  Error writing /home/*******/.ssh/authorized_keys: No such file or directory ]

So i'm stumped again Sad

Hypothetically, you should use a passphrase (password) for the certificate. The upside of not using one is that you don't have to type in a password for the key to work each time. I cannot recommend you NOT using a passphrase for your certificates, but can tell you I have done it both ways and find my laziness prevails and I don't use a passphrase. This is a compromise in security, but nowhere nearly as bad as using a username and password in plain text is. The web can tell you more about the absence of a passphrase and its vulnerabilities. Google that...

What happens in step three? Did you use vi to create (and edit) the authorized_keys file? Do you have vi installed on your Ubuntu install? It comes with CentOS. You should when you type:

Code:
vi ~/.ssh/authorized_keys

be creating and editing in the root folder because of the ~. What are you typing into bash for step 3? Your error tells me you are trying to make keys/certificates for a user other than root. The article's command will only work for root. You must have changed the vi command to your other user in the home folder.

Code:
Error writing /home/YOURUSERNAME/.ssh/authorized_keys: No such file or directory

Your error is because of the "~" in the command - it puts you into the /root folder which does not have a /home folder in it. The home folder is at the top level ("/")... You would need:

Code:
vi ~/../home/YOURUSERNAME/.ssh/authorized_keys

to work in the home folder.

Did you try?

Code:
sudo vi ~/../home/YOURUSERNAME/.ssh/authorized_keys

As per your past postings - wanting to be able to use WinSCP to modify and manipulate folders that have root privileges, you will need to make the key for the root user, otherwise you will run into the same issue as you have in the past with manipulating files in WinSCP.

Please outline what exactly you are doing and have done as it is not the same as that tutorial. I also save my keys to a folder called keys on my PC's C: drive at the top level. Then I use Pagent or Kagent that starts and loads the keys when I start windows to maintain the keys for when I use WinSCP, Filezilla, or mRemoteNG as a bash terminal so they simply log into the server on their own. No passphrase for the keys allows me to log in to my server with one click from these applications.

Can you post your work up to where you have problems? If you are using another user, put something like "otherusername" instead of ******. We need to know if you are:

A) Working as root user
B) Trying to create keys for *what* user - remember, to mitigate your issues with file permissions in WinSCP will take making keys for root.
Everyone makes mistakes, but to truly screw up it takes the root password!
Reply
Thanks given by:


Messages In This Thread
Cloning ubuntu 14 setup - by CMs222 - 01-24-2018, 07:31 PM
RE: Cloning ubuntu 14 setup - by Me.B - 01-27-2018, 06:03 AM
RE: Cloning ubuntu 14 setup - by TGates - 01-27-2018, 06:28 AM
RE: Cloning ubuntu 14 setup - by CMs222 - 01-27-2018, 01:41 PM
RE: Cloning ubuntu 14 setup - by worksmarter - 01-29-2018, 07:44 AM
RE: Cloning ubuntu 14 setup - by worksmarter - 01-29-2018, 09:47 AM
RE: Cloning ubuntu 14 setup - by CMs222 - 01-29-2018, 01:50 PM
RE: Cloning ubuntu 14 setup - by worksmarter - 01-30-2018, 12:20 AM
RE: Cloning ubuntu 14 setup - by CMs222 - 01-31-2018, 05:48 AM
RE: Cloning ubuntu 14 setup - by worksmarter - 01-31-2018, 08:12 AM
RE: Cloning ubuntu 14 setup - by worksmarter - 01-31-2018, 09:23 AM
RE: Cloning ubuntu 14 setup - by TGates - 02-02-2018, 08:27 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
OS - Ubuntu 18.04 or Centos 8 Qrash 1 5 ,325 01-18-2021, 07:48 PM
Last Post: Jettaman
Ubuntu 18.04 vaxition 1 4 ,793 08-06-2020, 11:03 AM
Last Post: Jettaman
Php5.6 on ubuntu possible? lorenaustin 0 2 ,569 06-11-2020, 01:01 AM
Last Post: lorenaustin

Forum Jump:


Users browsing this thread: 2 Guest(s)