Skip to content

Commit 876b6cc

Browse files
Release 2.10.0
1 parent 2f8c5e8 commit 876b6cc

File tree

4 files changed

+212
-133
lines changed

4 files changed

+212
-133
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extensions:
2020

2121
To run this sample:
2222

23-
See [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity#defaultazurecredential) and prepare the authentication works best for you. For more details on authentication, please refer to [AUTH.md](https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/resourcemanager/docs/AUTH.md).
23+
See [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#defaultazurecredential) and prepare the authentication works best for you. For more details on authentication, please refer to [AUTH.md](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md).
2424

2525
git clone https://github.com/Azure-Samples/compute-java-manage-vm-from-vm-with-msi-credentials.git
2626

pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,17 @@
5454
<dependency>
5555
<groupId>com.azure.resourcemanager</groupId>
5656
<artifactId>azure-resourcemanager</artifactId>
57-
<version>2.1.0</version>
57+
<version>2.10.0</version>
5858
</dependency>
5959
<dependency>
6060
<groupId>com.azure</groupId>
6161
<artifactId>azure-identity</artifactId>
62-
<version>1.2.0</version>
62+
<version>1.4.1</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>com.jcraft</groupId>
66+
<artifactId>jsch</artifactId>
67+
<version>0.1.55</version>
6368
</dependency>
6469
<dependency>
6570
<groupId>commons-net</groupId>

src/main/java/com/azure/resourcemanager/compute/samples/ManageVirtualMachineFromMSIEnabledVirtualMachine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static void main(String[] args) {
4444
final boolean cleanupResource = args.length <= 3 || Boolean.getBoolean(args[3]);
4545
final String linuxVMName = "yourVirtualMachineName";
4646
final String userName = "tirekicker";
47-
final String password = Utils.password();
47+
final String sshPublicKey = Utils.sshPublicKey();
4848

4949
//=============================================================
5050
// ManagedIdentityCredential Authenticate
@@ -77,7 +77,7 @@ public static void main(String[] args) {
7777
.withoutPrimaryPublicIPAddress()
7878
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
7979
.withRootUsername(userName)
80-
.withRootPassword(password)
80+
.withSsh(sshPublicKey)
8181
.create();
8282

8383
System.out.println("Created virtual machine using ManagedIdentityCredential.");

0 commit comments

Comments
 (0)