<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>commands on Notities</title><link>https://www.vandenboom.icu/en/tags/commands/</link><description>Recent content in commands on Notities</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 03 Jan 2025 22:23:19 +0000</lastBuildDate><atom:link href="https://www.vandenboom.icu/en/tags/commands/index.xml" rel="self" type="application/rss+xml"/><item><title>Quick git commands to add a local repository in Visual Studio Code to GitHub</title><link>https://www.vandenboom.icu/en/blog/2025-quick-git-commands-to-add-a-local-repository-in-visual-studio-code-to-github/</link><pubDate>Fri, 03 Jan 2025 22:23:19 +0000</pubDate><guid>https://www.vandenboom.icu/en/blog/2025-quick-git-commands-to-add-a-local-repository-in-visual-studio-code-to-github/</guid><description>T﻿ype in the terminal of Visual Studio Code
#﻿ git init
#﻿ git add .
#﻿ git commit -m &amp;ldquo;initial commit&amp;rdquo;
C﻿reate a new repository on GitHub
#﻿ git remote add origin &amp;lt;the new .git URL&amp;gt;
Example: #﻿ git remote add orign https://github.com/martijnvandenboom/Java_tools.git
#﻿ git push -u origin main</description></item><item><title>SSH in remote machine with SSH keys and run command in new Python 3</title><link>https://www.vandenboom.icu/en/blog/2024-ssh-in-remote-machine-with-ssh-keys-and-run-command-in-new-python-3/</link><pubDate>Wed, 03 Apr 2024 20:20:39 +0000</pubDate><guid>https://www.vandenboom.icu/en/blog/2024-ssh-in-remote-machine-with-ssh-keys-and-run-command-in-new-python-3/</guid><description>T﻿o make a script to run remote commands in a client server network.
import subprocess def ssh_exec_command(hostname, username, command): ssh_cmd = ['ssh', f'{username}@{hostname}', command] ssh_process = subprocess.Popen( ssh_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True ) output, error = ssh_process.communicate() if error: print(&amp;quot;Error:&amp;quot;, error) else: print(&amp;quot;Output:&amp;quot;, output) # Replace these with your actual credentials and command hostname = 'remote_host_address' username = 'your_username' command = 'ls -l' ssh_exec_command(hostname, username, command)</description></item></channel></rss>