protected function appendSSHConfig()
    {
        $ssh_config_file = $this->sshConfigFile();

        $hostname = $this->hostNameForConfigFile();

        $host_string = "Host " . $hostname;

        if (strpos(file_get_contents($ssh_config_file), $host_string) !== false) {
            $this->info("SSH config for host: $host_string already exists");
            return;
        }

        $this->info("Adding server config to SSH config file $ssh_config_file");
        if (! File::exists($ssh_config_file)) {
            touch($ssh_config_file);
        }
        $ip_address = $this->ip_address();
        $config_string = "\n$host_string\n  Hostname $ip_address \n  User forge\n  IdentityFile /home/sergi/.ssh/id_rsa\n  Port 22\n  StrictHostKeyChecking no\n";
        File::append($ssh_config_file, $config_string);

        $this->info('The following config has been added:' . $config_string);
    }