LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Yum through SSH. (https://www.linuxquestions.org/questions/centos-111/yum-through-ssh-4175599039/)

hack3rcon 02-05-2017 09:01 AM

Yum through SSH.
 
Hello.
I use CentOS 7 amd64 and I like tunnel Yum through an SSH connection. I use "ssh -Cav root@IP -D 127.0.0.1:9051" and like my Yum use SSH connection.

Any idea?

Thank you.

michaelk 02-05-2017 10:53 AM

just a reminder it is bad practise to login in as root. The basic syntax for dynamic port forwarding is:

ssh -D 9051 user@server

You need to change yum.conf to use the proxy

proxy=socks5h://localhost:9051

wpeckham 02-05-2017 11:52 AM

Quote:

Originally Posted by michaelk (Post 5665513)
just a reminder it is bad practise to login in as root. The basic syntax for dynamic port forwarding is:

ssh -D 9051 user@server

You need to change yum.conf to use the proxy

proxy=socks5h://localhost:9051

I would avoid doing that if at all possible, but if you must this is about the best way.

hack3rcon 02-06-2017 02:28 AM

Quote:

Originally Posted by michaelk (Post 5665513)
just a reminder it is bad practise to login in as root. The basic syntax for dynamic port forwarding is:

ssh -D 9051 user@server

You need to change yum.conf to use the proxy

proxy=socks5h://localhost:9051

Thank you.


All times are GMT -5. The time now is 05:26 AM.