LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-05-2017, 09:01 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post 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.
 
Old 02-05-2017, 10:53 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,759

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
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
 
1 members found this post helpful.
Old 02-05-2017, 11:52 AM   #3
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,695

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
Quote:
Originally Posted by michaelk View Post
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.
 
1 members found this post helpful.
Old 02-06-2017, 02:28 AM   #4
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by michaelk View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg0000 Fedora 8 04-13-2011 11:25 AM
[SOLVED] YUM via SSH SOCKs tunnel. hen770 Linux - Software 1 12-03-2010 07:37 AM
Run yum through ssh? prn Linux - General 3 10-27-2006 04:18 AM
YUM via SSH ACDII Fedora 5 08-30-2006 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 03:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration