tags:

views:

26

answers:

2

How to download openssh package using apt-get?

The problem is that the package is already installed so I get only:

sudo apt-get install openssh -d
Reading package lists... Done
Building dependency tree... Done
openssh is already the newest version.

Because of being already installed, I don't get the debian package. I should remove it first, but then I would lose USB networking.

I know that this procedure is possible with aptitude, but it's not available for me.

A: 

try "apt-get source" with --compile or --download-only

xt.and.r
Does that make it exactly the same debian package as on repository?
I don't think so, but compiled would be faster then precompiled package, because will be optimized for your system.
xt.and.r
+1  A: 
sudo apt-get install openssh -d --reinstall

this will download the pacakge into /var/cache/apt/archives. however I think you probably mean "openssh-server" or "openssh-client" or "ssh" or something, there isn't an openssh pacakge in debian. You also might be interested in the "--print-uris" option if you are going to be scripting this.

stew
Thanks. In my system ssh is a meta-package containing both server and client.
right, ssh is, but not openssh as originally stated :)
stew