{"id":4052,"date":"2018-05-23T17:35:16","date_gmt":"2018-05-23T13:35:16","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/setup-new-user-and-ssh-key-authentication-using-ansible\/"},"modified":"2018-05-23T17:35:16","modified_gmt":"2018-05-23T13:35:16","slug":"setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04\/","title":{"rendered":"Setup New User and SSH Key Auth. using Ansible on Ubuntu 18.04"},"content":{"rendered":"<p>Ansible is a simple automation tool that automates software applications deployment, cloud provisioning, and configuration management. It&#8217;s a server orchestration tool that helps you to manage and control a large number of server nodes from single places called &#8216;Control Machines&#8217;. Ansible was created by Michael DeHaan in 2012 and is written in Python and Powershell.<\/p>\n<p>In this tutorial, we will learn how to deploy a new user and enable the SSH Key-Based authentication using the automation tool Ansible. We will also learn how to configure the Ansible &#8216;Control Machine&#8217;, as well as how to write simple ansible playbook.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>2 or more Ubuntu 18.04 Servers<\/li>\n<ul>\n<li>10.0.15.10\u00a0\u00a0\u00a0\u00a0\u00a0 control-machine<\/li>\n<li>10.0.15.21\u00a0\u00a0\u00a0\u00a0\u00a0 ansi01<\/li>\n<li>10.0.15.22\u00a0\u00a0\u00a0\u00a0\u00a0 ansi02<\/li>\n<\/ul>\n<li>Root privileges<\/li>\n<\/ul>\n<h2 id=\"what-we-will-do\">What we will do?<\/h2>\n<ol>\n<li>Setup Ansible Control Machine<\/li>\n<li>Define User and SSH Key<\/li>\n<li>Create Inventory File<\/li>\n<li>Create Ansible Playbook<\/li>\n<li>Deploy Server Using Playbook<\/li>\n<li>Testing<\/li>\n<\/ol>\n<h2 id=\"step-setup-ansible-control-machine\">Step 1 &#8211; Setup Ansible Control Machine<\/h2>\n<p>In this tutorial, we will be using the Ubuntu 16.04 servers as the Ansible &#8216;Machine Control&#8217; and ansible hosts. The first step we need to do is to set up the &#8216;control machine&#8217;.<\/p>\n<p>We will install python and ansible on the ansible &#8216;control machine&#8217; by running the following command.<\/p>\n<p class=\"command\">sudo apt install python ansible -y<\/p>\n<p><a class=\"fancybox\" id=\"img-2\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04.png\" alt=\"Setup Ansible Control Machine\" width=\"500\" height=\"173\" title=\"\"><\/a><\/p>\n<p>After the installation is complete, we will add a new system user.<\/p>\n<p>We will add a new user named &#8216;provision&#8217; in order to perform server provisioning using Ansible.<\/p>\n<p>Add new user &#8216;provision&#8217; and give the user a password.<\/p>\n<p class=\"command\">useradd -m -s \/bin\/bash provision<br \/>passwd provision<\/p>\n<p>Now add the &#8216;provision&#8217; user for sudo without the password by creating new configuration file under the &#8216;\/etc\/sudoers.d\/&#8217; using the command below.<\/p>\n<p class=\"command\">echo\u00a0 -e &#8216;provision\\tALL=(ALL)\\tNOPASSWD:\\tALL&#8217; &gt; \/etc\/sudoers.d\/provision<\/p>\n<p>A new user has been created, and now it can use sudo without a password.<\/p>\n<p><a class=\"fancybox\" id=\"img-1\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-1.png\" alt=\"Add user\" width=\"500\" height=\"207\" title=\"\"><\/a><\/p>\n<h2 id=\"step-define-user-and-ssh-key\">Step 2 &#8211; Define User and SSH Key<\/h2>\n<p>In this step, we will define the user for ansible hosts. This user will be automatically created by ansible, so we just need to define the username, password, and the ssh public key.<\/p>\n<p>For each server (&#8216;ansi01&#8217; and &#8216;ansi02&#8217;), we will create a new user named &#8216;provision&#8217; with password &#8216;secret01&#8217;. And we need to encrypt the &#8216;secret01&#8217; password using the mkpasswd command.<\/p>\n<p>Encrypt the &#8216;secret01&#8217; password using the command below.<\/p>\n<p class=\"command\">mkpasswd &#8211;method=SHA-512<br \/>TYPE THE PASSWORD &#8216;secret01&#8217;<\/p>\n<p><strong>Note:<\/strong><\/p>\n<p>Make sure the &#8216;whois&#8217; package is installed on the system, or you can install using the following command.<\/p>\n<p class=\"command\">sudo apt install whois -y<\/p>\n<p>And you will get the SHA-512 encrypted password.<\/p>\n<p><a class=\"fancybox\" id=\"img-3\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/3.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-2.png\" alt=\"Define User and SSH Key\" width=\"500\" height=\"95\" title=\"\"><\/a><\/p>\n<p>Next, we will generate a new ssh-key.<\/p>\n<p>Login to the &#8216;provision&#8217; user and generate the ssh key using the ssh-keygen command.<\/p>\n<p class=\"command\">su &#8211; provision<br \/>ssh-keygen -t rsa<\/p>\n<p>Now the user and password have been defined, and the ssh key has been created l(ocated at the &#8216;.ssh&#8217; directory).<\/p>\n<p><a class=\"fancybox\" id=\"img-4\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-3.png\" alt=\"user and password have been defined\" width=\"499\" height=\"550\" title=\"\"><\/a><\/p>\n<h2 id=\"step-create-new-inventory\">Step 3 &#8211; Create New Inventory<\/h2>\n<p>In this step, we will define the inventory files for all server hosts.<\/p>\n<p>Login as the &#8216;provision&#8217; user and create a new directory for the project.<\/p>\n<p class=\"command\">su &#8211; provision<br \/>mkdir -p ansible01\/<\/p>\n<p>Go to the &#8216;ansible01&#8217; directory and create a new inventory file &#8216;inventory.ini&#8217; using <a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim<\/a>.<\/p>\n<p class=\"command\">cd ansible01\/<br \/>vim inventory.ini<\/p>\n<p>Paste the following configuration there.<\/p>\n<pre class=\"system\">[webserver]<br\/>ansi01 ansible_host=10.0.15.21<br\/>ansi02 ansible_host=10.0.15.22<\/pre>\n<p>Save and exit.<\/p>\n<p>Now create a new ansible configuration file &#8216;ansible.cfg&#8217;.<\/p>\n<p class=\"command\">vim ansible.cfg<\/p>\n<p>Paste the following configuration there.<\/p>\n<pre class=\"system\">[defaults]<br\/>inventory = \/home\/provision\/ansible01\/inventory.ini<\/pre>\n<p>Save and exit.<\/p>\n<p><a class=\"fancybox\" id=\"img-5\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-4.png\" alt=\"Create New Inventory\" width=\"500\" height=\"298\" title=\"\"><\/a><\/p>\n<p>The ansible inventory file has been created, and our ansible scripts will be located under the &#8216;provision&#8217; user, inside the &#8216;ansible01&#8217; directory.<\/p>\n<h2 id=\"step-create-ansible-playbook\">Step 4 &#8211; Create Ansible Playbook<\/h2>\n<p>Ansible Playbook is set of instructions that you send to run on a single or group of server hosts. It represents the ansible-provisioning, where the automation is defined as tasks, and all jobs like installing packages, editing files, will be done by ansible modules.<\/p>\n<p>In this step, we will create a new ansible playbook to deploy a new user, deploy the ssh key, and configure the ssh service.<\/p>\n<p>Before we create a new ansible playbook, we will scan all server fingerprint using the ssh-keyscan command as below.<\/p>\n<p class=\"command\">ssh-keyscan 10.0.15.21 &gt;&gt; ~\/.ssh\/known_hosts<br \/>ssh-keyscan 10.0.15.22 &gt;&gt; ~\/.ssh\/known_hosts<\/p>\n<p>Those servers fingerprint will be stored at the &#8216;.ssh\/known_hosts&#8217; file.<\/p>\n<p><a class=\"fancybox\" id=\"img-6\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-5.png\" alt=\"Create Ansible Playbook\" width=\"500\" height=\"199\" title=\"\"><\/a><\/p>\n<p><strong>Note:<\/strong><\/p>\n<p>If you have a lot of server nodes, you can save your host list and then manually scan the ssh key fingerprint using bash script as shown below.<\/p>\n<p class=\"command\">for i in $(cat list-hosts.txt)<br \/>do<br \/>ssh-keyscan $i &gt;&gt; ~\/.ssh\/known_hosts<br \/>done<\/p>\n<p>Next, create the ansible playbook named &#8216;deploy-ssh.yml&#8217; using vim.<\/p>\n<p class=\"command\">vim deploy-ssh.yml<\/p>\n<p>Paste following the ansible playbook there.<\/p>\n<pre class=\"system\" readability=\"25\">---<br\/>- hosts: all<br\/>\u00a0 vars:<br\/>\u00a0\u00a0\u00a0 - provision_password: '$6$w9S3t7x1kRtmG0u$6nVU9KZsC12Q8DYI4FtgKPy.e\/cq\/jseB\/.DViTO1SpUnoCy.dxcOf8hyfitGq5V0yhgXccxzlqm2o.I3SlDJ0'<br\/>\u00a0 gather_facts: no<br\/>\u00a0 remote_user: root<p>\u00a0 tasks:<\/p><p>\u00a0 - name: Add a new user named provision<br\/>\u00a0\u00a0\u00a0 user:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 name=provision<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 password={{ provision_password }}<\/p><p>\u00a0 - name: Add provision user to the sudoers<br\/>\u00a0\u00a0\u00a0 copy:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dest: \"\/etc\/sudoers.d\/provision\"<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 content: \"provision\u00a0 ALL=(ALL)\u00a0 NOPASSWD: ALL\"<\/p><p>\u00a0 - name: Deploy SSH Key<br\/>\u00a0\u00a0\u00a0 authorized_key: user=provision<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 key=\"{{ lookup('file', '\/home\/provision\/.ssh\/id_rsa.pub') }}\"<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 state=present<\/p><p>\u00a0 - name: Disable Password Authentication<br\/>\u00a0\u00a0\u00a0 lineinfile:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dest=\/etc\/ssh\/sshd_config<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 regexp='^PasswordAuthentication'<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 line=\"PasswordAuthentication no\"<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 state=present<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 backup=yes<br\/>\u00a0\u00a0\u00a0 notify:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 - restart ssh<\/p><p>\u00a0 - name: Disable Root Login<br\/>\u00a0\u00a0\u00a0 lineinfile:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 dest=\/etc\/ssh\/sshd_config<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 regexp='^PermitRootLogin'<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 line=\"PermitRootLogin no\"<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 state=present<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 backup=yes<br\/>\u00a0\u00a0\u00a0 notify:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 - restart ssh<\/p><p>\u00a0 handlers:<br\/>\u00a0 - name: restart ssh<br\/>\u00a0\u00a0\u00a0 service:<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 name=sshd<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 state=restarted<\/p><\/pre>\n<p>Save and exit.<\/p>\n<p>On the playbook script:<\/p>\n<ul>\n<li>we create the &#8216;deploy-ssh.yml&#8217; playbook script to be applied on all servers defined in the &#8216;inventory.ini&#8217; file.<\/li>\n<li>we create the ansible variable &#8216;provision_password&#8217;, containing the encrypted password for the new user.<\/li>\n<li>Set the Ansible facts to &#8216;no&#8217;.<\/li>\n<li>Define the &#8216;root&#8217; user as a remote user to perform tasks automation.<\/li>\n<li>We create new tasks for adding a new user, add the user to the sudoers, and upload the ssh key.<\/li>\n<li>We create new tasks for configuring the ssh services, disabling the root login, and disable password authentication. Tasks for configuring the ssh will trigger the &#8216;restart ssh&#8217; handlers.<\/li>\n<li>We create a handler to restart the ssh service.<\/li>\n<\/ul>\n<h2 id=\"step-run-the-playbook\">Step 5 &#8211; Run the Playbook<\/h2>\n<p>Login to the &#8216;provision&#8217; user and go to the &#8216;ansible01&#8217; directory.<\/p>\n<p class=\"command\">su &#8211; provision<br \/>cd ansible01\/<\/p>\n<p>Now run the the &#8216;deploy-ssh.yml&#8217; playbook using the command as shown below.<\/p>\n<p class=\"command\">ansible-playbook deploy-ssh.yml &#8211;ask-pass<\/p>\n<p>Type your root password, and you will get the result as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-7\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-6.png\" alt=\"Run the Playbook\" width=\"500\" height=\"445\" title=\"\"><\/a><\/p>\n<p>All tasks for deploying a new user and ssh key have been completed successfully.<\/p>\n<h2 id=\"step-testing\">Step 6 &#8211; Testing<\/h2>\n<p>Test using ansible command.<\/p>\n<p class=\"command\">ansible webserver -m ping<br \/>ansible webserver -m shell -a id<\/p>\n<p>Now you will get the green messages as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-8\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-7.png\" alt=\"Testing Ansible\" width=\"500\" height=\"330\" title=\"\"><\/a><\/p>\n<p>Now we can manage those &#8216;ansi01&#8217; and &#8216;ansi02&#8217; servers using Ansible, and the &#8216;provision&#8217; user will be default user for Ansible.<\/p>\n<p>Testing connection to the servers<\/p>\n<p class=\"command\">ssh 10.0.15.21<br \/>ssh 10.0.15.22<\/p>\n<p>And you will be connected to each server using the default key &#8216;.ssh\/id_rsa&#8217; file, and using the user &#8216;provision&#8217;.<\/p>\n<p><a class=\"fancybox\" id=\"img-9\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-8.png\" alt=\"Test server connection\" width=\"394\" height=\"550\" title=\"\"><\/a><\/p>\n<p><a class=\"fancybox\" id=\"img-10\" href=\"https:\/\/www.howtoforge.com\/images\/setup_new_user_and_ssh_key_authentication_using_ansible\/big\/10.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-9.png\" alt=\"Another test\" width=\"374\" height=\"550\" title=\"\"><\/a><\/p>\n<p>Deploying new user and ssh-key using ansible has been completed successfully.<\/p>\n<h2 id=\"reference\">Reference<\/h2>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<p>\n<a href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fsetup-new-user-and-ssh-key-authentication-using-ansible%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-10.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fsetup-new-user-and-ssh-key-authentication-using-ansible%2F&amp;text=Setup+New+User+and+SSH+Key+Auth.+using+Ansible+on+Ubuntu+18.04&amp;via=howtoforgecom&amp;related=howtoforgecom\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-11.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/twitter.com\/howtoforgecom\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-12.png\" height=\"20\" alt=\"\" title=\"\"><\/a><br \/>\n<a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fwww.howtoforge.com%2Ftutorial%2Fsetup-new-user-and-ssh-key-authentication-using-ansible%2F\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/05\/setup-new-user-and-ssh-key-auth-using-ansible-on-ubuntu-18-04-13.png\" height=\"20\" alt=\"\" title=\"\"><\/a>\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Ansible is a simple automation tool that automates software applications deployment, cloud provisioning, and configuration management. It&#8217;s a server orchestration tool that helps you to manage and control a large number of server nodes from single places called &#8216;Control Machines&#8217;. Ansible was created by Michael DeHaan in 2012 and is written in Python and Powershell. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-4052","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/4052","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=4052"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/4052\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=4052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=4052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=4052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}