Very useful and easy to understand. I had to use the passphrase instead of password to make it works, but in general, everything was the same, THANKS A LOT!
@Zancb3 жыл бұрын
Hi there. Thanks for the video. One quick suggestion: Do not connect to host machines as root. Connecting as root (or allowing root over ssh) is a gigantic security flaw. We (as in the IT community) should promote the use of connecting to a remote host as a specific user, rather than root. Thanks again! This is really cool stuff.
@chriskeo3923 жыл бұрын
Request: ssh basics/fundamentals. And it's use cases Would be great.
@duanewalker89253 жыл бұрын
Paramiko makes it really easy to connect to Linux servers and Cisco devices. I used to do this with Perl years ago but it was very frustrating. You had to tell the library the different prompts, etc. IOS and CatOS devices worked differently.
@seantellsit14312 жыл бұрын
I'm not sure what I'm doing wrong.... when I try to run the snippet at 1:30, I keep getting an error. "PermissionError: [Errno 13] Permission denied: 'C:/Users/seans/.ssh/known_hosts' I've launched python from an elevated command prompt, but no joy.
@Networkprofessor5 ай бұрын
Thanks!
@mav293 жыл бұрын
great job, perfect example very clear, concise easy to learn. well explained
@ozzman530Ай бұрын
Interesting that the presence of a ssh certificate in the Known_hosts file instantly breaks paramiko when you get to the load keys step. Was hoping to get a tip on connecting paramiko to an adva networking device but I encounter a Authentication failed error from python. If you have idea on how to debug paramiko authentication I'd love to get your thoughts.
@user-tf4rs7um5e3 ай бұрын
Very well done, great explanation! Thank you. Have you done much with the stdin? When is it useful within paramiko?
@sandhuaditya4855 Жыл бұрын
How do you keep the The shell to persist with these commands. Like your pulling the hostname, if you go ahead and navigate to a particular directory. And then in the next command You want to touch file .txt you will notice that the exec closed out and that you are not in the directory that You Navigate to do but are in the home directory again. You have to change the commands inside a single exec Is there any way around that
@anatoly_north25643 жыл бұрын
thx! you video my problem with Piramiko
@robertofleitas2612 Жыл бұрын
Hello, how can I make an paramiko SSH connection to a SSH host, through remote desktop (RDP)? thank you.
@Sparshchokra2 жыл бұрын
Hi Sir, Can you please specify how may I use this inspect() function to get knowledge about object?
@vishalmaurya9722 жыл бұрын
Great Content. Could you please help me for SFTP using paramiko only the current data-1 files from Lan to remote server. I guess exec_command will work on remote server only. What if we want to run the command on out Local i.e. LAN files? please help.
@preethiratnala36502 жыл бұрын
I did same as you said but when I replace hostname with directory command 'ls -lrt' Its giving total 0 why its happening
@chriskeo3923 жыл бұрын
Sick content
@rishabhgupta77422 жыл бұрын
Will this code work for connecting host with IPv6 address as well? If not what changes might be required.
@thefamousdjx2 жыл бұрын
Any idea how you would then connect to a mysql database in that server? I cant find anything about this
@DevOpsJourney2 жыл бұрын
You would connect to it the same way as if you were SSH'd into another server. Should just be able to run your sqlclient command to connect
@francescoleo21672 жыл бұрын
Hi, could you share the coding again ? Cus the link for Code Available is not available now🤕
@DevOpsJourney2 жыл бұрын
Apologies, the website is back up now!
@juanariza90933 жыл бұрын
How do I save command output to variables? I am not able to manipulate variables when assigning variables to output
@andreygunz1793 жыл бұрын
how do you run more then 1 command on 1 host for example a switch that needs password>cli>configure>hostname its been hell searching for a solution online
@samira-alirn Жыл бұрын
It was so helpfull for me thank u very much
@toshumalhotra2 жыл бұрын
But how you get authenticated, you haven't supply password for root anywhere, have you already copied your public key to all nodes?
@sophylong59402 жыл бұрын
can you help me with a code that actually download a file already uploaded in a remote server?
@vibhorkumar88542 жыл бұрын
How to keep ssh alive for long running cmd on a remote server? I am getting socket timeout and buffed.timeout while running long running shell command on remote host.
@DevOpsJourney2 жыл бұрын
Timeouts would be on the serverside. Check the settings on the remote host ssh server service.
@juanpe51443 жыл бұрын
Hello I have a duubt if I want send more command how I can do it?
@igorfagundes21773 жыл бұрын
3:53 As a robot, I got offended
@DevOpsJourney3 жыл бұрын
🤣 🤖🤖🤖
@prasadsankar37753 жыл бұрын
Thanks for the video. I have a question - How to change directory after SSHing the server?
@MaîtrePhoque3 жыл бұрын
cd
@joostvoncken9502 жыл бұрын
isnt the autoaddPolicy vulnerable for Man in the middle attacks?
@DevOpsJourney2 жыл бұрын
If you are in a more secure environment you could add to known hosts manually
@davipires29992 жыл бұрын
Can I use the paramiko to run a script in the vm that the ssh server is installed?
@DevOpsJourney2 жыл бұрын
Yup!
@davipires29992 жыл бұрын
@@DevOpsJourney the machine that the ssh server installed can be windows? Everything Will work fine on windows?
@DevOpsJourney2 жыл бұрын
@@davipires2999 yes you can use paramiko to ssh into a windows box
@davipires29992 жыл бұрын
@@DevOpsJourney thanks mate, i'll try this tomorrow in my internship!!!
@thulasisunny19512 жыл бұрын
Hi, When I run the command same you given i am getting this error "Could not chdir to home directory /home/kyndrylssh: Permission denied" , can you think is that SSH connected ??? how can we confirm that...
@DevOpsJourney2 жыл бұрын
Try a 'hostname'. That's how I confirm
@thulasisunny19512 жыл бұрын
@@DevOpsJourney u mean command 'hostname'? I am getting something for that also
@shristiagrawal20803 жыл бұрын
How to open shell using this and see what's going on
@simoneonorato12233 жыл бұрын
Sorry but how do you tell your program where the private key is stored on ur pc?
@DevOpsJourney3 жыл бұрын
Hey Simone. Use the below function and specify the path: load_system_host_keys(filename='path/to/hostkeys') I hope that helps!
@simoneonorato12233 жыл бұрын
@@DevOpsJourney Thanks a lot!!!!
@TheSaruVerse Жыл бұрын
but does paramiko support ssh multiplexing ? if number of sessions are running , just like ssh natively supports , please help
@DevOpsJourney Жыл бұрын
hey there, as of my knowledge, it does not support SSH multiplexing... but I could be wrong
@TheSaruVerse Жыл бұрын
@@DevOpsJourney thanks for the reply , but do you know anything which could ease up or does have the same kind of functionality, i am working on a project which involves multiple ssh to get some of the system metrics from the os , but i cant use any of monitoring tools , i can only use ssh any help i would really appreciate thanks
@kennychavez89943 жыл бұрын
I have a problem. It seems that the fingerprint of the server I was connecting to changed, but I can't get it to work again. It gives me this error: Traceback (most recent call last): File "C:\Users\user\Documents\update_automation\main3.py", line 12, in stdin, stdout, stderr = client.exec_command('hostname') File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\client.py", line 514, in exec_command chan.exec_command(command) File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\channel.py", line 72, in _check return func(self, *args, **kwds) File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\channel.py", line 257, in exec_command self._wait_for_event() File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\channel.py", line 1226, in _wait_for_event raise e File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\transport.py", line 2055, in run ptype, m = self.packetizer.read_message() File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\packet.py", line 459, in read_message header = self.read_all(self.__block_size_in, check_rekey=True) File "C:\Users\user\Documents\update_automation\venv\lib\site-packages\paramiko\packet.py", line 303, in read_all raise EOFError() EOFError
@TheSibyjohn3 жыл бұрын
please how long and big is this code?
@varadmulay2 жыл бұрын
what is in the "known_hosts" file ?
@DevOpsJourney2 жыл бұрын
Server fingerprints. That prompt that comes up when you ssh into a new server asking about if you trust the finger print - when you do it's saved to the known hosts file. If you try to connect to a server with the same IP but the fingerprint has changed, ssh will warn you that something has changed
@varadmulay2 жыл бұрын
@@DevOpsJourney in what format ? Ip, type, pkey?
@enriquecordero61633 жыл бұрын
Is possible to do a sudo to another user? , ssh with brad and then sudo to tomcat?
@DevOpsJourney3 жыл бұрын
maybe try 'su tomcat'
@enriquecordero61633 жыл бұрын
@@DevOpsJourney and the password?
@francis.joseph2 жыл бұрын
How to get the known hosts file created
@DevOpsJourney2 жыл бұрын
should be in ~/.ssh/known_hosts, or c:\users\\.ssh\known_hosts
@rsskg2 жыл бұрын
How to stay on server in comand-line?
@stfu_anderr2 жыл бұрын
use while and instead of 'hostname' enter 'input()'