- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Sftp with SSH
Operating System - HP-UX
1753685
Members
5405
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2008 05:56 AM
тАО10-29-2008 05:56 AM
Sftp with SSH
Hello, I have created a process that uses sftp to connect to a remote system and authnticates with a key that I generated with ssh-keygen. The key is named id-dsa. When I watch the process with a -v i see it check parse a list of keys and it gets to that particular one can accepts it. My question is how do I hav a key named something other then id_dsa to be offered by the server? Thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2008 06:08 AM
тАО10-29-2008 06:08 AM
Re: Sftp with SSH
hey,
see this
you can give dsa or rsa
Client
Steps: For SSH Without a Password
On the client run the following commands:
$ mkdir -p $HOME/.ssh
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa/rsa -f $HOME/.ssh/id_d sa -P ''
This should result in two files,
$HOME/.ssh/id_dsa/rsa (private key) & $HOME/.ssh/id_dsa.pub (public key).
Copy $HOME/.ssh/id_dsa.pub to the server.
Server:
On the server run the following commands:
$ mkdir -p $HOME/.ssh
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
$ chmod 0600 $HOME/.ssh/authorized_keys2
Depending on the version of OpenSSH the following commands may also be required:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys
$ chmod 0600 $HOME/.ssh/authorized_keys
An alternative is to create a link from authorized_keys2 to authorized_keys:
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys
On the client test the results by ssh'ing to the server:
$ ssh -i $HOME/.ssh/id_dsa/rsa server
(Optional) Add the following $HOME/.ssh/config on the client:
Host server
IdentityFile ~/.ssh/id_dsa
This allows ssh access to the server without having to specify the path to the id_dsa/rsa file as an argument to ssh each time
Suraj
see this
you can give dsa or rsa
Client
Steps: For SSH Without a Password
On the client run the following commands:
$ mkdir -p $HOME/.ssh
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa/rsa -f $HOME/.ssh/id_d sa -P ''
This should result in two files,
$HOME/.ssh/id_dsa/rsa (private key) & $HOME/.ssh/id_dsa.pub (public key).
Copy $HOME/.ssh/id_dsa.pub to the server.
Server:
On the server run the following commands:
$ mkdir -p $HOME/.ssh
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
$ chmod 0600 $HOME/.ssh/authorized_keys2
Depending on the version of OpenSSH the following commands may also be required:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys
$ chmod 0600 $HOME/.ssh/authorized_keys
An alternative is to create a link from authorized_keys2 to authorized_keys:
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys
On the client test the results by ssh'ing to the server:
$ ssh -i $HOME/.ssh/id_dsa/rsa server
(Optional) Add the following $HOME/.ssh/config on the client:
Host server
IdentityFile ~/.ssh/id_dsa
This allows ssh access to the server without having to specify the path to the id_dsa/rsa file as an argument to ssh each time
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2008 06:19 AM
тАО10-29-2008 06:19 AM
Re: Sftp with SSH
Shalom,
http://www.hpux.ws/?p=10
It would be easier to use scp for the file transfer. Also part of the openssh package which includes ssh sftp and scp
SEP
http://www.hpux.ws/?p=10
It would be easier to use scp for the file transfer. Also part of the openssh package which includes ssh sftp and scp
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-29-2008 07:33 AM
тАО10-29-2008 07:33 AM
Re: Sftp with SSH
> [...] When I watch the process with a -v i
> see it [...]
That's nice, but we can't see what you see
unless you show it to us.
> [...] offered by the server?
Offered _by_ the server or _to_ the server?
I may not understand what you want. Are you
looking for something like "-i file" for
"ssh"? If so, sftp probably has a way to let
you specify the same thing.
It might also help if you mentioned your OS
version, and, perhaps, your SSH and/or SFTP
version(s).
> see it [...]
That's nice, but we can't see what you see
unless you show it to us.
> [...] offered by the server?
Offered _by_ the server or _to_ the server?
I may not understand what you want. Are you
looking for something like "-i file" for
"ssh"? If so, sftp probably has a way to let
you specify the same thing.
It might also help if you mentioned your OS
version, and, perhaps, your SSH and/or SFTP
version(s).
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP